Hi Michael,

On Mon, Feb 23, 2015 at 2:17 AM, Michael <keybou...@gmail.com> wrote:
> So a quick question: How do I undo/abort a merge?
> I am learning, and experimenting. I was experimenting with "git merge", 
> forgot the "--no-commit", and discovered the hard way that aborting the 
> editor that comes up without saving does NOT abort the merge.
> And git merge --abort fails, because the merge succeeded.
> Git Gui has a way to amend the comment of the last merge, but no way to undo 
> it.
> I figure this should be simple, but I don't know how.

One way to do that :
- look up the hash of the commit you want to go back to, let's say
it's 'abc1234'
- run `git reset --hard abc1234`.

> ===
> How do I say "save all changes in my working directory to a temporary 
> branch"? "git stash", I discovered, does NOT -- at least, not without some 
> additional options and I'm not sure what those should be.

One way to do that :

git checkout -b my_temporary_branch
git add .
git commit -m "temporary commit"
git checkout -


You received this message because you are subscribed to the Google Groups "Git 
for human beings" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to git-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to