开发者

.gitignore Question

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
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜