Skip to main content

merge-conflicts

Resolve an in-progress Git merge or rebase conflict without losing either change's intent. Use when Git reports unresolved conflict markers during a merge or rebase.

跳到安装

来源信息

仓库
ContractorKeith/skills
最近来源活动
2026年7月22日 14:04
检测到的 SKILL.md 语言
英语
星标
0
分支
0

安装方式

默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。

检查来源文件

决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。

文件资源管理器
2 个文件

正在显示 SKILL.md

SKILL.md
来源说明 · 只读预览
name
merge-conflicts
description
Resolve an in-progress Git merge or rebase conflict without losing either change's intent. Use when Git reports unresolved conflict markers during a merge or rebase.
# Merge Conflicts Resolve the conflict in front of you. Do not abort the merge or rebase. ## Read the situation Start with the repository state, history, and unresolved files. Use `git status`, inspect the conflict hunks, and identify whether Git is merging or rebasing. ## Recover both intents For each conflicted hunk, trace both sides to their primary sources: commits, commit messages, pull requests, and the issue or ticket that motivated them. Understand what each change was meant to preserve before editing. ## Make the smallest correct resolution - Preserve both intents when they work together. - When they cannot coexist, choose the behavior that serves the stated goal of the merge or rebase and record the trade-off. - Do not introduce unrelated behavior while resolving the hunk. - Remove every conflict marker and inspect the final combined code, not only the edited lines. ## Prove and finish Discover the project's checks and run the relevant formatter, type check, and tests. Fix any breakage caused by integrating the changes. Stage the resolved files. For a merge, create the merge commit when Git needs one. For a rebase, run `git rebase --continue` and repeat the same process for each remaining conflict until the rebase completes.
在 GitHub 查看