Hi Michael,

On Mon, Feb 23, 2015 at 8:41 AM, Michael <keybou...@gmail.com> wrote:
> On 2015-02-22, at 9:04 PM, Nicolas Dermine <nicolas.derm...@gmail.com> wrote:
>> 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`.
> Thank you.
> Now, how do I get rid of the unwanted merge object?
> Here's my reflog:
> keybounceMBP:2aec26bc01189ea4b310 michael$ git reset --hard 38c344c
> HEAD is now at 38c344c
> keybounceMBP:2aec26bc01189ea4b310 michael$ git reflog
> 38c344c HEAD@{0}: reset: moving to 38c344c
> f2500db HEAD@{1}: merge refs/remotes/origin/master: Merge made by the 
> 'recursive' strategy.
> 21e7868 HEAD@{2}: checkout: moving from limonite-placer to master
> 480d7c2 HEAD@{3}: checkout: moving from master to limonite-placer
> 21e7868 HEAD@{4}: checkout: moving from limonite-placer to master
> 480d7c2 HEAD@{5}: commit: Adjust swamp and river spawns.
> e6a4bf5 HEAD@{6}: commit: Should be working children (before testing)
> 9cb5d06 HEAD@{7}: commit: Syntax errors (I thought I had fixed these before)
> b4a020f HEAD@{8}: commit: *** CLOUDS don't work right now!
> 0123eaf HEAD@{9}: commit: 1. Rename everything, to avoid interfering with 
> Geologica, if used.
> ab78f7a HEAD@{10}: commit: Rename to match Draco's distribution
> fdedd8a HEAD@{11}: commit: First round of tuning placer deposits.
> bec1bbb HEAD@{12}: commit: Limonite deposits in wet, or hot biomes, as layers 
> of rich dirt.
> 21e7868 HEAD@{13}: checkout: moving from master to limonite-placer
> 21e7868 HEAD@{14}: checkout: moving from 
> 7ed0130d12c4fa3773653b320e2a6e5b0d584702 to master
> 7ed0130 HEAD@{15}: checkout: moving from master to 7ed0
> 21e7868 HEAD@{16}: clone: from 
> https://gist.github.com/2aec26bc01189ea4b310.git
> keybounceMBP:2aec26bc01189ea4b310 michael$
> The merge object at f2500db is the problem. That's what I want gone.

The merge object in your reflog bothers you?

When git's garbage collection kicks in it will go away (or you can
call `git gc` if you want).


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