I'm doing a Java project using Eclipse with the in build git-functionality. I have an Images
folder in the same directory as the .gitignore
file.
I want to ignore all files in Images
except Destroyed-icon.png
Layer_dot.png
Not-enough-repair-packs-icon.png
.
According to Is there a way to tell git to only include certain files instead of ignoring certain files? I should be able to use the following in my .gitignore
file, but is doesn't work. The whole Images
directory is ignored.
Images
!Images/Destroyed-icon.png
!Images/Layer_dot.png
!Images/Not-enough-repair-packs-icon.png
I already tried adding/removing all /
before and after Images
, restarting eclipse, closing and reopening the project but none of that worked.
There is nothing to Pull as well, my local repository is up to date.