$ git checkout to-branch
$ git merge from-branch
$ git status | grep unmerged
# file1 unmerged
# file2 unmerged
# file3 unmerged
$ vi file1
$ git add .
Ik! I did not want to "git add". I wanted to "git add file1"!
Now I can not get such behavior as:
$ git show :1:file2
I tried:
$ git reset file2
and
$ git checkout -m file2
but none of them returns file2 to the "unmerged" state. The git status does not display it as unmerged, and I do not have access to "git show: 1: file2", etc. I want to return the file to a state without interaction.
How can I get back to the state I was in before git add. "without losing my changes to file1?
source
share