# how to undo a merge

2 messages from 2011-11-01 to 2011-11-01. Participants: Hong-Ming Su, Vincent van Ravesteijn.
Thread: https://gitlist.dev/t/28815

## Hong-Ming Su, 2011-11-01 07:27

Subject: how to undo a merge
Message-ID: <CANiMyiEoaxAO3XxJMWEXP-L7C_xkxU0_nyDaor+TsJr-Ch7ARw@mail.gmail.com>
URL: https://gitlist.dev/e/CANiMyiEoaxAO3XxJMWEXP-L7C_xkxU0_nyDaor%2BTsJr-Ch7ARw%40mail.gmail.com

```
The commit graph before merging is:
A--B <-master
 \  \
  \  \
C--D--E--F <- dev

git checkout master
git merge dev

The commit graph after merging is:
A--B
 \  \
  \  \
C--D--E--F <- dev <-master

master fast-forward to commit F.
I want to "undo" the merge. What shall I do?

Thank you!

Best regards,
Hong-Ming

```

## Vincent van Ravesteijn, 2011-11-01 07:56

Subject: Re: how to undo a merge
Message-ID: <4EAFA610.9080101@lyx.org>
URL: https://gitlist.dev/e/4EAFA610.9080101%40lyx.org
In-Reply-To: <CANiMyiEoaxAO3XxJMWEXP-L7C_xkxU0_nyDaor+TsJr-Ch7ARw@mail.gmail.com>

```
Op 1-11-2011 8:27, Hong-Ming Su schreef:
> The commit graph before merging is:
> A--B<-master
>   \  \
>    \  \
> C--D--E--F<- dev
>
> git checkout master
> git merge dev
>
> The commit graph after merging is:
> A--B
>   \  \
>    \  \
> C--D--E--F<- dev<-master
>
> master fast-forward to commit F.
> I want to "undo" the merge. What shall I do?

git checkout master
git reset B

Vincent

```
