I originally checked in a file and pulled it to a development server. Now, I no longer want to to track them because the settings are different for every computer. After the first pull I changed a few lines.
开发者_运维百科In my .gitignore file I have this:
config/hostname.rb
Now, whenever I git pull
on the development server I get an error like this:
error: Your local changes to 'config/hostname.rb' would be overwritten by merge. Aborting.
Please, commit your changes or stash them before you can merge.
How can I get rid of this?
# ignore changes in a working tree file
git update-index --assume-unchanged config/hostname.rb
精彩评论