Well in that situation you can stash unstaged, reset, then pop. But that just reinforces the OP’s point. Not the most ergonomic or discoverable path for something that should be simple to do.
Re:
by michaelmior on Tuesday November 15, 2022 @09:15PM
(#33617991)
git reset HEAD@{1} should do the trick to "uncommit" and keep uncommitted changes in the absence of conflicts. (I may be missing some edge cases.) It does however unstage changes.
Re:
by galaxyLogic on Tuesday November 15, 2022 @09:30PM
(#33618101)
Right and it is not obvious: git reset HEAD@{1} .
Right, if you grok the git model then this makes sense. But if you just want to use a tool without learning how it manages state, git is a pain.
Isn’t this just git reset —soft HEAD~1?
Put my stuff from the last commit back into working directory?
Very unintuitive (soft?) and I’ve just memorized this for the past 10 years.
Re:
by mikepurvis on Wednesday November 16, 2022 @09:21AM
(#33623369)
So yes, in short I agree.