Say I have a file file.txt
,
I've committed some revisions and now I've edited it in my working copy, I didn't stage or commit these edits.
Then I use git checkout <an-old-revision> file.txt
, the file.txt
goes back to an old commit.
Now I regret my checkout, how do I bring my edits back?