8 ms·
Fix All Conflicts: Easy-To-use CUI for Fixing Git Conflicts
- jdc0589 9y agoI have basically the same complaint about most of the mergetools I've used; they tend to just do more than I want. I'm sure that's largely a PEBKAC problem, but..... ¯\_(ツ)_/¯ Definitely going to take a look at this; you screenshots look promising.
- Peaker 9y agoHave you looked at https://github.com/Peaker/git-mediate https://github.com/Peaker/git-mediate ? Everyone I talked into using it had always initially thought "meh" but later thanked me - claiming it's a huge life-saver :) It makes solving conflicts into a fun mechanical game while reducing erroneous merges by a lot.
- cynix 9y agoLooks nice! Would be great if it could show a 3-way diff with the common parent.
- eitland 9y agoHaven't tested this yet but for now my preferred solution is to edit the conflict markers directly in vs code then stage.
- fao_ 9y agoWhat's the difference between a TUI and a CUI?
- philipov 9y agoCurses User Interface?
- jacoblambda 9y agoThere isn't one.
- horo42 9y agoIf you can't install with brew: https://github.com/mkchoi212/fac/issues/9 https://github.com/mkchoi212/fac/issues/9
- mkchoi212 9y agoIt works now! `brew tap mkchoi212/fac https://github.com/mkchoi212/fac.git https://github.com/mkchoi212/fac.git && brew install fac`
- anaran 9y agoWhat's https://avatars0.githubusercontent.com/u/5487597 https://avatars0.githubusercontent.com/u/5487597 supposed to be, funny?
- jacobparker 9y agohttps://en.wikipedia.org/wiki/Maggot_Brain https://en.wikipedia.org/wiki/Maggot_Brain
- braindongle 9y agoLikely to have been conceived by George Clinton himself, whose taste is clearly impenetrable by us less funky souls: https://goo.gl/YZJDi5 https://goo.gl/YZJDi5
- vemv 9y agoOne thing I miss on every merge tool is full history context for both sides ("side" == ours/theirs). i.e., I don't want to just see the final state of ours/theirs, but the changes that us/them did in order to get to those final states. IOW, often, both sides of the diff are nearly identical, and I have to squint to see the actual difference, and make some additional effort to figure out the intent of each side. A better format would be, for each side: Original state -> change -> final state - "Original state" would be normally identical for both sides - "change" would be tiny and unique for each side, helps you see the intent of each side clearly - "final state" is normally pretty similar between sides, (which is what troubles me, if no context given). Maybe I'm missing something, feel free to correct
- lj3 9y agoI've found myself wanting the same thing. Git's diff algorithms are sometimes not as smart as I wish they were. Recently, when merging master into my feature branch, I had an incoming one line change trigger a single diff that was nearly the size of an entire file. That change wasn't even in the same area of the file I had been working on. Being able to walk forward and backwards through the incoming changes would have resolved the issue much faster than comparing "ours" and "theirs" by eye to see what actually changed.
- ChristianBundy 9y agoWhat triggered the diff? Always trying to learn more Git nonsense.
- lj3 9y agoI merged master into my feature branch. One of my colleagues added a property to a jsx element in the render function of a react component.
- jimktrains2 9y agoDid they re-indent, change line endings, or strip end of line whitespace?
- marcofatica 9y agowow!
- partycoder 9y agoThe diff/merge tools shipped with Perforce are good. They can be used with git as well.
- cpeterso 9y agoPerforce's P4Merge is the least-worst (free) merge app I've found for Mac. I use it for git and hg. That said, I'm always open for recommendations for something better.
- cpeterso 9y agobtw, you can download P4Merge (aka "Helix Visual Merge Tool") here: https://www.perforce.com/downloads/visual-merge-tool https://www.perforce.com/downloads/visual-merge-tool
- j_s 9y agohttps://semanticmerge.com https://semanticmerge.com seemed unique to me, and https://www.gmaster.io https://www.gmaster.io experiments with going farther.
- partycoder 9y agoSemantic patching can be good to resolve conflicts, but version control operates with non-semantic changes. This can be frustrating at times, since many code bases cannot be reformatted or refactored because it affects version control history.
- piscisaureus 9y agoI find "beyond compare" to be a very good merge tool. It's not free, but not very expensive either, and works well with git. (I'm not affiliated with them in any way)
- partycoder 9y agoBeyond Compare is a good tool. It allows to compare full directories, ignore whitespace, etc. I recommend Perforce's as a merge tool because it is better than average at the specific task of merging.
- ggm 9y agoIf I hate one thing, its merges denoted by <<<< old blah >>>> new bleaugh <<<< of all the diff notations, for some reason FreeBSD updater and git merge chose the worst (for me at least)
- z1mm32m4n 9y agoWhat is your favorite notation for merge boundaries?
- ggm 9y agoSee above: the one which provides the most context.
- AnssiH 9y agoAn IMHO significant improvement is setting merge.conflictStyle = diff3, so you get to see the original code as well: <<<<<<< My new code ||||||| The original code ======= The conflicting 'theirs' code >>>>>>> Same option for the non-git regular 'patch' command is "--merge=diff3".
- eridius 9y agoAny non-trivial merge conflict requires producing a hybrid of the two versions. From the screenshot it looks like all you can do is select one of the two versions. Isn't that extremely limiting? Also it looks like this doesn't show the ancestor version, which is a shame as that's extremely useful.
- tbrock 9y agoWhat I frequently have trouble with is knowing what is represented by “theirs” and “ours”. I wish it would just tell me the branch name instead because sometimes both commits are logically “ours” or “theirs”. Obviously that would only work for ‘git merge branch’ scenarios and the like but it’d be great.
- Rjevski 9y agoFor anyone using JetBrains tools like IntelliJ or similar, note that they all include a nice diff/merge tool: https://www.jetbrains.com/help/idea/running-intellij-idea-as-a-diff-or-merge-command-line-tool.html https://www.jetbrains.com/help/idea/running-intellij-idea-as...
- barrystaes 9y agoYeah most CLI mergetools are awefull.. if you want a nice git GUI, just use SmartGit. https://www.syntevo.com/smartgit https://www.syntevo.com/smartgit
- jhasse 9y agoOr Visual Studio Code.
- cpxPratik 9y agoFirst, what is CUI??
- txdv 9y agoCommandline User Interface
- b-zee 9y agoCharacter User Interface or Console User Interface (https://en.wikipedia.org/wiki/Command-line_interface https://en.wikipedia.org/wiki/Command-line_interface)
- jolmg 9y agoFollowing links on github, apparently it's Console User Interface. Looking at the project, it's what I've always known as a TUI (Text User Interface). I wonder why this new acronym appeared. It's even causing confusion with Commandline User Interface which sounds like CLI (Command Line Interface) which should be a different type of interface from TUI.
- bitwave 9y agoI use mostly https://github.com/mhagger/git-imerge https://github.com/mhagger/git-imerge for complex merges. imerge + meld is wonderful...
- topher200 9y agoI had a merge to do today so I installed and tried it. I liked it! Great context for each side of the change and great keyboard controls. Thanks for creating this mkchoi212!
- jbergens 9y agoI like the merge tool i Gitkraken, it makes it easy to choose one side for each conflict or edit the result directly. https://support.gitkraken.com/working-with-repositories/branching-and-merging https://support.gitkraken.com/working-with-repositories/bran...