Reputation: 1702
I have several config files that I would like to keep on GitHub but ignore further changes. By ignoring further changes I mean "If anyone clones the repo they will get the default version of those files and can edit those locally but when run git status
those files will not appear."
So what I did/try so far is:
So then I tried two options:
git rm --cached .
git add .
git commit .....`
But in this case a later commit actually deleted those files.
git update-index --assume-unchanged [filepath]
and it works but I don't want someone clone the repo and then to run this command. Is there any way without this command I can achieve my goal? Upvotes: 2
Views: 954
Reputation: 1702
In summary:
I see this is not possible as it violates the constitution of git. There are some workarounds though.
Upvotes: 1