Reputation: 1430
I excluded a specific folder from git with .gitignore. Today I need to track the files inside, but seems that deleting the line in .gitignore doesn't work.
I tried to do git update-index --no-assume-unchanged -R folder
but -R doesn't work, when I do git update-index --no-assume-unchanged folder
he tells me fatal: Unable to mark file media
because he is expecting a file not a folder.
So how do I track these files ?
Thank you very much.
Upvotes: 0
Views: 453
Reputation: 3712
If you get fatal: Unable to mark file media
, the file probably isn't in the repo. Try git ls-files -o
. This will tell you what files are not in the repository. If it's listed on there, then you have to do git add folder
. If it causes you any problems, you can maybe add git add -f folder
to force an add despite ignore settings.
Upvotes: 1
Reputation: 129556
you got step one right to get rid of the line that excludes it in the .gitignore file. Commit that. Now git add path/to/your/file
and commit. The file should now be tracked.
If it still isn't, check that you didn't set up a exclude pattern in the config that may be doing this.
Upvotes: 1