Github: Split diffs

Created on 16 May 2017  路  2Comments  路  Source: atom/github

From smashwilson/merge-conflicts#247:

git mergetool creates files for each conflicting side and merge base.

Example:

  • app/views/foobar.html_BASE_17711.slim
  • app/views/foobar.html_LOCAL_17711.slim
  • app/views/foobar.html_REMOTE_17711.slim

These files are useful to determine what was actually changed (by comparing base to local change or remote change), to resolve conflict.

There is split-diff plugin, so we only need to create above files (like mergetool) and open split diff.

Split diffs or alternate diff views is something that I'd always kind of wanted to investigate, but never had the time. I'm guessing this will be a common request 馃槅

merge conflict

Most helpful comment

I'm guessing this will be a common request

馃挴 Not just handy for merge conflicts, but also for a mini time-machine while coding. Like "how was it before I started to mess everything up". The split-diff package is really great for that.

Might also be neat: Have a way to also compare against other branches. "What's the diff if I would merge with remote/master". It's like sneak peek without actually merging. And it could also "warn" you of currently opened PRs that change the same file. Anyways, just some ideas.

All 2 comments

I'm guessing this will be a common request

馃挴 Not just handy for merge conflicts, but also for a mini time-machine while coding. Like "how was it before I started to mess everything up". The split-diff package is really great for that.

Might also be neat: Have a way to also compare against other branches. "What's the diff if I would merge with remote/master". It's like sneak peek without actually merging. And it could also "warn" you of currently opened PRs that change the same file. Anyways, just some ideas.

Yeah I always had troubles with using/reading merge conflict tools that have all changes inline even after extended use (it's one of the reasons I use gui apps to resolve conflicts rather than just sticking to a command-line editor, among other niceties that good split diff style tools provide).

I come from an Intellij background, and aside from them having some usability issues on where they could unify some of their code time machine like features with their main side-by-side differ editors, I feel like they do some things right that I never had to "get used to."

Anyways, even basic solid side-by-side for merge conflicts would be fantastic and make it easier to teach newbies to coding. :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

joshaber picture joshaber  路  4Comments

simurai picture simurai  路  3Comments

ccavolt picture ccavolt  路  3Comments

jazeee picture jazeee  路  3Comments

Hreacon picture Hreacon  路  3Comments