Dex
Dex

Reputation: 12759

.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?

Upvotes: 2

Views: 885

Answers (1)

Mauvis Ledford
Mauvis Ledford

Reputation: 42384

# ignore changes in a working tree file
git update-index --assume-unchanged config/hostname.rb

Upvotes: 2

Related Questions