threads / discuss / 25551

How do I get a list of all unmerged files?

Subject: How do I get a list of all unmerged files?

## tl;dr

8 messages between Oct 26, 2010 and Oct 27, 2010.

replies: 7people: 6as markdown or json

George Spelvin· Oct 26, 2010, 14:32 UTC · lore

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· Oct 26, 2010, 15:31 UTC · re: George Spelvin · lore

Re: How do I get a list of all unmerged files?

On Tue, Oct 26, 2010 at 10:32 AM, George Spelvin <linux@horizon.com> wrote:
Show 12 quoted lines
> 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.
Eric Raible· Oct 27, 2010, 17:00 UTC · re: Jay Soffian · lore

Re: Re: How do I get a list of all unmerged files?

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· Oct 27, 2010, 18:39 UTC · re: Eric Raible · lore

Re: How do I get a list of all unmerged files?

On Oct 27, 2010, at 10:00 AM, Eric Raible wrote:
Show 8 quoted lines
> 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· Oct 27, 2010, 19:18 UTC · re: Eric Raible · lore

Re: Re: Re: How do I get a list of all unmerged files?

On 11:59 AM, Eric Raible wrote:
Show 7 quoted lines
> 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
Junio C Hamano· Oct 26, 2010, 16:05 UTC · re: George Spelvin · lore

Re: How do I get a list of all unmerged files?

"George Spelvin" <linux@horizon.com> writes:
Show 7 quoted lines
> 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· Oct 26, 2010, 16:23 UTC · re: Junio C Hamano · lore

Re: How do I get a list of all unmerged files?

2010/10/27 Junio C Hamano <gitster@pobox.com>:
Show 11 quoted lines
> "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· Oct 26, 2010, 17:06 UTC · re: George Spelvin · lore

Re: How do I get a list of all unmerged files?

On 11:59 AM, George Spelvin wrote:
Show 14 quoted lines
> 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

← back to recent threads