Tuesday, December 27, 2011

Ignore (modified) repository file with Git

So here is a problem, after you add something to git repository you have to remove it so you can ignore it. Problem with this is sometimes you want to ignore file but not remove it from repository. For example I am using RoR on windows and rest team is using MaxOS, so I should not commit Gemfile.lock but I cannot remove it either here is a way:

git update-index --assume-unchanged Gemfile.lock
or you can do same with directory
git update-index --assume-unchanged log

No comments:

Post a Comment