开发者

.gitignore Question

开发者 https://www.devze.com 2023-03-04 13:04 出处:网络
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

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

精彩评论

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