Frage

My site uses an open source forum application with source code hosted on Github, and I have to update it using git pull.

The problem is I made some changes to a tracked file, so Git no longer allows me to do a git pull successfully. So, here's what I did to fix this:

  • Added the file to .gitignore
  • Ran the command git update-index --assume-unchanged file.rb to make sure that the file isn't tracked.

But I can't still do a git pull probably because of this -- even though the file is untracked locally, it's still tracked by the remote repository. In this case, how am I supposed to do a git pull to update my site, while making sure that file.rb is ignored?

EDIT: Please note that I can't make any changes to the remote repo. Any changes have to be made locally.

War es hilfreich?

Lösung

Instead of ignoring the file, try to commit it and then do the pull. If the file is not conflicting, it will be merged, otherwise you will be able to resolve conflicts locally using http://git-scm.com/docs/git-mergetool, for example.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top