# mini-wierdness with "git am"

2 messages from 2011-11-30 to 2011-12-01. Participants: Aghiles, Andrew Wong.
Thread: https://gitlist.dev/t/29056

## Aghiles, 2011-11-30 23:12

Subject: mini-wierdness with "git am"
Message-ID: <CAKCZoVb5-JfzTXK9pUoem_0oQHrSLkrxQZUOZGTX3GGgebPGwA@mail.gmail.com>
URL: https://gitlist.dev/e/CAKCZoVb5-JfzTXK9pUoem_0oQHrSLkrxQZUOZGTX3GGgebPGwA%40mail.gmail.com

```
Hello,

I am using : git version 1.7.0.3, in Mac OS X.

A slightly strange behavior occurs with "git am --abort". Here
is the sequence:

> git am 000*
error: ... : patch doesn not apply
(oops, forgot to reset)
> git reset --hard HEAD~1
> git am 000*
previous rebase directory ... still exists but mbox given.
(oops, forgot to abort)
> git am --abort

At this point, my repository is back to ORIG_HEAD!
Meaning that it reverted my preivous "git reset --hard HEAD~1".

Hope this is clear.

As usual, thanks for the great product.

-- aghiles

```

## Andrew Wong, 2011-12-01 15:38

Subject: Re: mini-wierdness with "git am"
Message-ID: <4ED79F72.4000003@sohovfx.com>
URL: https://gitlist.dev/e/4ED79F72.4000003%40sohovfx.com
In-Reply-To: <CAKCZoVb5-JfzTXK9pUoem_0oQHrSLkrxQZUOZGTX3GGgebPGwA@mail.gmail.com>

```
On 11/30/2011 06:12 PM, Aghiles wrote:
> At this point, my repository is back to ORIG_HEAD!
> Meaning that it reverted my preivous "git reset --hard HEAD~1".
>   

This behavior seems to have been fixed in v1.7.3.5 and later. The new
behavior will skip the reverting, and only perform the clean up.

http://article.gmane.org/gmane.comp.version-control.git/164045

```
