I have a Git repo where I keep my latest code. Whenever I update the code in this repo, I go to the cloned production working tree and run git pull to get the latest code from the repo.
This morning I tried this, and received a git error stating that my working tree had uncommitted changes (which should never happen because all developers know not to modify this code directly.) I decided not to keep the local production changes, and I did git checkout on the file to get the latest from the repo. This also failed with an error.
I tried several more steps and they all failed. Can anyone please help me figure out how to dump the local file changes and restore the latest file from the repo?
There's one possible complication: I tried git rm on the offending file hoping I could remove it from my working tree and then successfully pull the file from the repo. This also did not work and now the git rm is on the repo HEAD.