Skip to contentSkip to conversation

How do I get a list of all unmerged files?

DISCUSSION George Spelvin 6 participants 8 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw

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.

#1 lore raw
Quoted 7 lines · George Spelvin

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"?

#2 lore raw

2010/10/27 Junio C Hamano <[email protected]>:

Quoted 11 lines
Quoted 7 lines · George Spelvin

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 ??

#3 lore raw
In reply to George Spelvin
Quoted 8 lines · George Spelvin

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*.

Quoted 4 lines

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.

#4 lore raw
Quoted 4 lines · Jay Soffian
$ 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

#5 lore raw
Quoted 7 lines · Eric Raible
Quoted 4 lines · Jay Soffian
$ 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

#6 lore raw
In reply to Eric Raible
Quoted 7 lines · Eric Raible
Quoted 4 lines · Jay Soffian
$ 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

#7 lore raw
In reply to George Spelvin
Quoted 8 lines · George Spelvin

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*.

Quoted 6 lines

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