Added git alias to list only conflicted files#1733
Conversation
|
@tbhaxor I like to think of these as building off each other, like chords, similar to @NoahGorny this file is getting a lot of activity. I think we need to clean it up and make a pattern clear - probably alphabetizing would be a good start. |
| alias gdt='git difftool' | ||
| alias gdv='git diff -w "$@" | vim -R -' | ||
| alias gc='git commit -v' | ||
| alias gcf='git diff --name-only --diff-filter=U' # lists only conflicted files |
There was a problem hiding this comment.
Greetings - Always great to see new git aliases.
Not thrilled with the gc prefix used here as its rather exclusively used for commit aliases.
This is a version of a 'list files' action.
Although there aren't currently any aliases based on 'git ls-files', I think this action would live among them.
Q: Would 'git ls-files --unmerged' give the same (or similar-enough) results?
Although 'conflicted' is technically correct, it seems 'unmerged' is the official term.
I'm thinking 'glsu' is the most appropriate alias for this action.
There was a problem hiding this comment.
@davidpfarrell I totally agree with you. I have new proposal. I would be cool to show the lines / blocks of the files that have conflicts
Basically we can use grep to show files starting with <<<<
There was a problem hiding this comment.
Basically we can use grep to show files starting with <<<<
I don't know about that - I think listing the files that are unmerged is a good idea - I will definitely use the alias.
I just think that glsu is the best name for the alias.
Additionally, I think the alias could execute git ls-file --unmerged vs git diff ... (assuming they return similar results)
|
hey @tbhaxor |
|
Hey @NoahGorny, yes ofcourse. I got busy with job. Will it be ok if work from this weekend? |
Sure thing! No need to feel rushed, I just wanted to know if you plan on continuing this 😄 |
|
@davidpfarrell Here is a difference between ls-files and diff Also it has been taken from stackoverflow, https://stackoverflow.com/questions/3065650/whats-the-simplest-way-to-list-conflicted-files-in-git My bad, at time I couldn't read the stackoverflow question completely. Also i don't think ls-files would be needed here, because the purpose of this command is to "list the conflicted files" |
|
@tbhaxor Thank for pointing out the differences. The relevant portion of the So Soo, for this use case, the HOWEVER I still stand by my opinion that the name of the alias should be The Additionally, |
|
hey @tbhaxor, wanna follow up on this? 😄 |
|
Yes, actually there is nothing to change. @davidpfarrell 's feature is another and mine is different. Please see the comment. The edit is ready to be merged. Later on we can refactor the code |
I agree with what @davidpfarrell said here:
|
|
gentle ping @tbhaxor |
This is complete on my end. Please ask @davidpfarrell to approve it so that it can be merged 😄 |
Please rename the alias to |
Done :) |
davidpfarrell
left a comment
There was a problem hiding this comment.
Ok I think this is ready !
I rebased to improve the location after #1743 was merged, lemme know what you think @davidpfarrell |
|
Well now that the file is so nicely organized, I was able to discover this existing section: Which leads me to 2 problems:
I believe users will want to see How to clean up this mess I created? Here's what comes to mind:
I'm happy to spend the time to make whatever change(s) we agree upon since I lead us here ... |
Hey @davidpfarrell, I agree that the location is better, and I added glsut alias. Take a look now |
NoahGorny
left a comment
There was a problem hiding this comment.
You know @davidpfarrell, you really need maintainer status by now.. @nwinkler do you agree?
|
@tbhaxor thanks for your contribution! |

No description provided.