the fish epic

story of the fish

git woe: git checkout not resetting my file?!

without comments

Jotting this down for posterity:

If I want to add a file to the index to be committed and then don’t commit it, and then want to pull a newer version of the file from remote, well uh, I can’t do that. Git will say “you have changes to this file that you didn’t commit! commit or stash it first plz.”

Do: git reset HEAD and unstage the file.

Don’t: git checkout over and over and hit the return carriage with rage because it doesn’t really fix anything.

Written by Lo Chan

June 18th, 2010 at 6:26 pm

Posted in mundane

Tagged with

Leave a Reply