I tried searching for an answer to this, but haven't found anything that matches quite like this problem. Feel free to link me to an answer if there is one already out there.
What I did was commit and push a large number of changes as one commit. I didn't merge that push into master though. I now want to go back to the state before I staged anything, so I can stage the changes into separate commits.
I've tried creating a new branch (saved-work) with the pushed changes, deleting the original remote branch (user-login), then merging the new branch into the original local branch, but that just takes me back to where I am now, with the user-login branch containing nothing to add/commit.
So how do I get all those changes back so I can review and stage them individually (using git add -p)?
git reset --soft HEAD~1
and thengit reset HEAD .
. But now I see from your response thatgit reset --soft HEAD~2
would have done both of those commands in one. Thanks! – Kwon