Earlier quoted context omitted.
Sounds like this would be a nightmare to rebase onto.
Not to mention breaking git bisect horribly.
Resolve simple merge conflicts on GitHub
21–30 of 71 posts
Re: Resolve simple merge conflicts on GitHub
#22On my team I've found that it's incredibly useful to commit the merge conflicts and conflict markers, then immediately resolve the conflicts in the next commit. This gives you one commit that shows exactly how the two branches merged together, followed by a commit that shows exactly how the conflicts were resolved. The resolution commit can then be code reviewed independently for a nice clean view of the conflicts in…
You actually can distinguish the new lines. For any non-trivial merge conflict resolution committed as part of the merge, `git show $SHA` will actually show you the conflict resolution. More specifically, if the diff contains anything that's not just a line taken from either of the parents, then that thing is shown.
Re: Resolve simple merge conflicts on GitHub
#23Earlier quoted context omitted.
It's literally the hallmark of GitHub... How else would pull requests work? (well, there _is_ the rebase option now...)
Hmm. I usually do merges locally as serious stuff should be built and tested before pushing anyway, so probably why never used GitHub's hosted functions.
Re: Resolve simple merge conflicts on GitHub
#24Earlier quoted context omitted.
It's literally the hallmark of GitHub... How else would pull requests work? (well, there _is_ the rebase option now...)
Hmm. I usually do merges locally as serious stuff should be built and tested before pushing anyway, so probably why never used GitHub's hosted functions.
Yes and no. Build in your CI server that's set up to mirror your prod environment after pushing, but before merging. That's what the whole industry of CI providers and integrations built into and around GitHub and GitLab is for.
Re: Resolve simple merge conflicts on GitHub
#25Earlier quoted context omitted.
You actually can distinguish the new lines. For any non-trivial merge conflict resolution committed as part of the merge, `git show $SHA` will actually show you the conflict resolution. More specifically, if the diff contains anything that's not just a line taken from either of the parents, then that thing is shown.
Yeah, I have no doubt that you can somehow show this information via the command line. The problem is that it's hidden in GitHub's Pull Request web UI, where all of our code review happens. Committing the conflicts and then resolving in the next commit surfaces the conflict resolutions to the PR where it can be reviewed like all of the other code we write.
Re: Resolve simple merge conflicts on GitHub
#26Re: Resolve simple merge conflicts on GitHub
#27Earlier quoted context omitted.
Great idea! Although this does break cherry-pick, doesn't it?
I'd imagine this also breaks bisect (and might make your CI system very confused), since you have a non-good commit.
Re: Resolve simple merge conflicts on GitHub
#28diff3 conflict style display would be considerably more useful.
It can be a bit noisier at first but once you learn to read it, I find it makes resolving conflicts so much easier.
For those of you who haven't used it, try switching it on and/or read https://psung.blogspot.com.au/2011/02/reducing-merge-headach... for more details.
tl;dr it shows