I have two branches I am working in, develop
and staging
. First one is for development purposes, the second one is for a deployment which is basically the development code on a test deployment where I add dummy data to the database.
I keep some files from graphic design in the develop
branch, e.g. Adobe Photoshop files. Surely I don't need or want them in my staging
branch, so I added the folling line into my .gitignore
file (it's a subfolder which contains all those files):
...
/gfx_material/
And I had removed the files from the staging
branch by executing the following command on the unwanted files (found in this answer):
git rm --cached
Now in the develop
branch there have been modifications on files in the /gfx_material/
folder. And when trying to merge the files from develop
into staging
I get the error:
$ git merge develop
CONFLICT (modify/delete): gfx_material/path/file.psd deleted in HEAD and
modified in develop. Version develop of gfx_material/path/file.psd left in tree.
Automatic merge failed; fix conflicts and then commit the result.
Why? Shouldn't this file (and others in that folder) be ignored?