You can remove the file from the local cache first and push that
git rm --cached /file/to/be/removed/from/cache
Then do the status to see the delete has taken place
You will see something like
Then push the change
Also you might get something like
fatal: Pathspec ‘some.file.name.goes.here’ is in submodule ‘some/folder/name’
Also you might notice, if you commit and pushed, only some skeleton of the of the folder structure without the actual files would be committed.
The root of the problem is the folder you are trying to add is tracked under git itself.
This would confuse git and would rather leave it up to you.
First go ahead and remove the .git folder in the new directory
sudo rm -rf /path/to/new/folder/.git
Then clear the cache from git memory of the new folder
git rm -r --cache /path/to/new/folder
Then when you do the
you will see all the new files being listed and you can commit that.
If there is an image change on the same file name, say logo.png or front.jpeg, the change won’t happen right away unless you force refresh it on browser to clear the cache.
The problem with this one is when you have dynamic updates and your users couldn’t see the change right away b/c of the cache.
The simple fix for this would be appending version at the end of the file name. Like your original html would look like:
img height="200" src="/path/to/image/file.ext"
Then appending the version at the end
img height="200" src="/path/to/image/file.ext?v=someVersionGoesHere"
For any backend it would be easy to append the versioning when the image is presented. It could be random number or unix timestamp would work in this case too..
var version = new Date()->getTime(); //get the unix timestamp
var path = "/path/to/image/file.ext?v="+version;
Shall do the trick. I used jQuery her but, it is not limited to it..
If you are working on the symfony and testing the changes, and you want to look at how it looks on the production env by just changing the url.. and if you are not seeing your current changes – most probably it is caching issue:
do the following being in your symfony project..
php app/console cache:clear --env=prod --no-debug
That is it