TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Resolve simple merge conflicts on GitHub

228 点作者 moby超过 8 年前

6 条评论

pkamb超过 8 年前
On my team I&#x27;ve found that it&#x27;s incredibly useful to <i>commit</i> 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 introduced in the merge. It also allows you to easily reset to the merge commit and resolve the conflicts differently.<p>The standard git workflow (and this github feature) seems to promote resolving the conflicts alongside all of the other changes in the merge working copy. This make me nervous, as there&#x27;s no way to differentiate the <i>new</i> lines that were introduced to resolve merge conflicts from the thousands of lines of (previously reviewed) code from the feature branch.<p>If you&#x27;re not careful, completely unrelated working-copy code and behavior can be introduced in a &quot;merge commit&quot; and neither you or any of your reviewers will notice. &quot;Looks good to me.&quot;
评论 #13162458 未加载
评论 #13162547 未加载
评论 #13162437 未加载
评论 #13162498 未加载
评论 #13166520 未加载
评论 #13162447 未加载
评论 #13162428 未加载
messutied超过 8 年前
So simple, so useful, I wonder if this feature wasn&#x27;t already in Gitlab since it seems to be more full featured
评论 #13162549 未加载
orivej超过 8 年前
diff3 conflict style display would be considerably more useful.
评论 #13162874 未加载
rosstex超过 8 年前
Finally! This is excellent news.
评论 #13162304 未加载
评论 #13162966 未加载
jklein11超过 8 年前
To me this feels like making a commit without unit testing first. When I find a conflict I like to be able to resolve it and then do some unit testing to make sure that my revision didn&#x27;t miss anything.
评论 #13163840 未加载
评论 #13163417 未加载
mojuba超过 8 年前
I didn&#x27;t know I could merge on github.com in the first place... where is their merge function, by the way?
评论 #13162487 未加载