# How do I get a list of all unmerged files?

8 messages from 2010-10-26 to 2010-10-27. Participants: George Spelvin, Jay Soffian, Junio C Hamano, Gavin Guo, Eric Raible, Joshua Juran.
Thread: https://gitlist.dev/t/25551

## George Spelvin, 2010-10-26 14:32

Subject: How do I get a list of all unmerged files?
Message-ID: <20101026143245.11433.qmail@science.horizon.com>
URL: https://gitlist.dev/e/20101026143245.11433.qmail%40science.horizon.com

```
After a merge with conflicts, mostly resolved by rerere, I want to pass a list of
all unmerged files to the editor for manual review.

I can see the list (wrapped in a bunch of inconvenient human-readable cruft)
in "git status".  I can also get a list (again with a bunch of extraneous
info) from "git ls-files -u".  What I can't figure out is how to get
"git ls-files -u" with --stage turned *off*.

I'm sure this exists somewhere, but I can't find it.  Can someone enlighten
me?

vim `git command here`

Thank you.

```

## Jay Soffian, 2010-10-26 15:31

Subject: Re: How do I get a list of all unmerged files?
Message-ID: <AANLkTi=JipA6P72hY5_FSvohCruf8hqsJc8Rh53FzAzT@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTi%3DJipA6P72hY5_FSvohCruf8hqsJc8Rh53FzAzT%40mail.gmail.com
In-Reply-To: <20101026143245.11433.qmail@science.horizon.com>

```
On Tue, Oct 26, 2010 at 10:32 AM, George Spelvin <linux@horizon.com> wrote:
> After a merge with conflicts, mostly resolved by rerere, I want to pass a list of
> all unmerged files to the editor for manual review.
>
> I can see the list (wrapped in a bunch of inconvenient human-readable cruft)
> in "git status".  I can also get a list (again with a bunch of extraneous
> info) from "git ls-files -u".  What I can't figure out is how to get
> "git ls-files -u" with --stage turned *off*.
>
> I'm sure this exists somewhere, but I can't find it.  Can someone enlighten
> me?
>
> vim `git command here`

$ git help unmerged
`git unmerged' is aliased to `!git ls-files --unmerged | cut -f2 | uniq'

If there's a better way to do it, I don't know what it is.

j.

```

## Junio C Hamano, 2010-10-26 16:05

Subject: Re: How do I get a list of all unmerged files?
Message-ID: <7v1v7dhrc7.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7v1v7dhrc7.fsf%40alter.siamese.dyndns.org
In-Reply-To: <20101026143245.11433.qmail@science.horizon.com>

```
"George Spelvin" <linux@horizon.com> writes:

> After a merge with conflicts, mostly resolved by rerere, I want to pass a list of
> all unmerged files to the editor for manual review.
>
> I can see the list (wrapped in a bunch of inconvenient human-readable cruft)
> in "git status".  I can also get a list (again with a bunch of extraneous
> info) from "git ls-files -u".  What I can't figure out is how to get
> "git ls-files -u" with --stage turned *off*.

"rerere status"?

```

## Gavin Guo, 2010-10-26 16:23

Subject: Re: How do I get a list of all unmerged files?
Message-ID: <AANLkTikthqc9xzJd0sDTXfVW6eGCNjZ0xpZuOmocFTt0@mail.gmail.com>
URL: https://gitlist.dev/e/AANLkTikthqc9xzJd0sDTXfVW6eGCNjZ0xpZuOmocFTt0%40mail.gmail.com
In-Reply-To: <7v1v7dhrc7.fsf@alter.siamese.dyndns.org>

```
2010/10/27 Junio C Hamano <gitster@pobox.com>:
> "George Spelvin" <linux@horizon.com> writes:
>
>> After a merge with conflicts, mostly resolved by rerere, I want to pass a list of
>> all unmerged files to the editor for manual review.
>>
>> I can see the list (wrapped in a bunch of inconvenient human-readable cruft)
>> in "git status".  I can also get a list (again with a bunch of extraneous
>> info) from "git ls-files -u".  What I can't figure out is how to get
>> "git ls-files -u" with --stage turned *off*.
>
> "rerere status"?

I think it should be reset ?? or revert ??

```

## Eric Raible, 2010-10-26 17:06

Subject: Re: How do I get a list of all unmerged files?
Message-ID: <4CC70A9B.4030801@nextest.com>
URL: https://gitlist.dev/e/4CC70A9B.4030801%40nextest.com
In-Reply-To: <20101026143245.11433.qmail@science.horizon.com>

```
On 11:59 AM, George Spelvin wrote:
> After a merge with conflicts, mostly resolved by rerere, I want to pass a list of
> all unmerged files to the editor for manual review.
> 
> I can see the list (wrapped in a bunch of inconvenient human-readable cruft)
> in "git status".  I can also get a list (again with a bunch of extraneous
> info) from "git ls-files -u".  What I can't figure out is how to get
> "git ls-files -u" with --stage turned *off*.
> 
> I'm sure this exists somewhere, but I can't find it.  Can someone enlighten
> me?
> 
> vim `git command here`
> 
> Thank you.

It's not exactly what you asked for but this might
give you what you want:

	git config merge.tool vim
	git mergetool

HTH - Eric

```

## Eric Raible, 2010-10-27 17:00

Subject: Re: Re: How do I get a list of all unmerged files?
Message-ID: <4CC85AA2.1050406@nextest.com>
URL: https://gitlist.dev/e/4CC85AA2.1050406%40nextest.com
In-Reply-To: <AANLkTi=JipA6P72hY5_FSvohCruf8hqsJc8Rh53FzAzT@mail.gmail.com>

```
On 11:59 AM, Jay Soffian wrote:
> $ git help unmerged
> `git unmerged' is aliased to `!git ls-files --unmerged | cut -f2 | uniq'
> 
> If there's a better way to do it, I don't know what it is.

How about: git diff --name-only | uniq

```

## Joshua Juran, 2010-10-27 18:39

Subject: Re: How do I get a list of all unmerged files?
Message-ID: <DD284F82-88E1-44D8-B2B7-C11ED9F3F7DE@gmail.com>
URL: https://gitlist.dev/e/DD284F82-88E1-44D8-B2B7-C11ED9F3F7DE%40gmail.com
In-Reply-To: <4CC85AA2.1050406@nextest.com>

```
On Oct 27, 2010, at 10:00 AM, Eric Raible wrote:

> On 11:59 AM, Jay Soffian wrote:
>> $ git help unmerged
>> `git unmerged' is aliased to `!git ls-files --unmerged | cut -f2 |  
>> uniq'
>>
>> If there's a better way to do it, I don't know what it is.
>
> How about: git diff --name-only | uniq

I use `git diff --stat`, via alias `git ds`.

Josh

```

## Eric Raible, 2010-10-27 19:18

Subject: Re: Re: Re: How do I get a list of all unmerged files?
Message-ID: <4CC87B0C.8020906@nextest.com>
URL: https://gitlist.dev/e/4CC87B0C.8020906%40nextest.com
In-Reply-To: <4CC85AA2.1050406@nextest.com>

```
On 11:59 AM, Eric Raible wrote:
> On 11:59 AM, Jay Soffian wrote:
>> $ git help unmerged
>> `git unmerged' is aliased to `!git ls-files --unmerged | cut -f2 | uniq'
>>
>> If there's a better way to do it, I don't know what it is.
> 
> How about: git diff --name-only | uniq

Or even better: git diff --name-only --diff-filter=U

```
