diff --git a/factory/best-practices/git.md b/factory/best-practices/git.md index 3f401d3..44f0aaa 100644 --- a/factory/best-practices/git.md +++ b/factory/best-practices/git.md @@ -12,6 +12,20 @@ - Reset dirty state: `git checkout -- .` (only uncommitted changes) - Fetch latest: `git fetch origin master` +## Auto-fixable by Supervisor +- **Merge conflict on approved PR**: rebase onto master and force-push + ```bash + cd /tmp/harb-worktree- || git worktree add /tmp/harb-worktree- + cd /tmp/harb-worktree- + git fetch origin master + git rebase origin/master + # If conflict is trivial (NatSpec, comments): resolve and continue + # If conflict is code logic: escalate to Clawy + git push origin --force + ``` +- **Stale rebase**: `git rebase --abort && git checkout master` +- **Wrong branch**: `git checkout master` + ## Dangerous (escalate) - `git reset --hard` on any branch with unpushed work - Deleting remote branches