Resolve conflicts
Skill ForeverAProgrammer/claude-devflow/skills/resolve-conflicts
Claude Code plugin with skills for daily dev workflows — commits, standups, PRs, design docs, and GitHub automation.
npx -y skills add ForeverAProgrammer/claude-devflow --skill resolve-conflictsAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
Rebase the current branch onto the target branch to resolve PR conflicts.
SKILL.md
2.0 KB, 458 tokens by cl100k_base, as published. Nobody here has run it
Rebase the current branch onto the target branch to resolve PR conflicts.
Steps:
- Determine the target branch using the first method that succeeds:
- Run
gh pr view --json baseRefName,url 2>/dev/nullto get the PR's target branch and URL (requiresghand GitHub). - Run
git remote show origin 2>/dev/null | grep 'HEAD branch'to detect the default branch from the remote config (works with any git host). - Check which of
main,master, ordevelopexist on the remote withgit branch -r. - If none of the above work, ask the user to specify the target branch and stop until they do.
- Run
- Run
git fetch originto ensure the latest remote changes are available. - Run
git rebase origin/<target-branch>. - If the rebase succeeds with no conflicts, confirm to the user and skip to step 8.
- If the rebase stops with conflicts:
- Run
git diff --name-only --diff-filter=Uto list conflicting files. - For each conflicting file, read the file and show the conflict markers clearly.
- Resolve each conflict by choosing the correct code based on context:
- Prefer the incoming change (
theirs) if it supersedes the current change. - Prefer the current change (
ours) if the incoming change is unrelated. - Merge both sides if both changes are needed.
- Prefer the incoming change (
- After editing each file, run
git add <file>to mark it resolved.
- Run
- Once all conflicts are resolved, run
git rebase --continueto proceed. If more conflicts arise, repeat step 5. - If at any point a conflict is too ambiguous to resolve safely, run
git rebase --abort, explain what was ambiguous, and ask the user to resolve it manually. - Run
git push --force-with-leaseto update the remote branch. - Report the result: confirm the branch is rebased and print the PR URL if one was found in step 1, otherwise just confirm the branch is up to date with the target.
$ARGUMENTS
What ships with it
Read from the repository
Just SKILL.md. No reference files, no scripts.