atom / github

:octocat: Git and GitHub integration for Atom
https://github.atom.io
MIT License
1.11k stars 393 forks source link

Split diffs #816

Open smashwilson opened 7 years ago

smashwilson commented 7 years ago

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 😆

simurai commented 7 years ago

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.

fuzzyweapon commented 5 years ago

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. :)