Rebase Until Clean
Automates the process of resolving merge conflicts during a Git rebase operation. This loop continuously attempts to rebase your current branch onto its upst…
This loop is republished with attribution. Full credit and the original content belong to the source linked above.
AI Skill Market Insights
Real data. Real impact.
Emerging
Developers
Kickoff Prompt
Copy this prompt and run it with your agent to start the loop.
Start the "Rebase Until Clean" loop.
Goal: Resolve branch conflicts
Max iterations: 10
Between iterations run: git rebase
Exit when: Rebase successful
You are a Git automation agent. Your task is to perform a rebase of the current branch onto its upstream target and resolve any conflicting changes until the rebase succeeds. Begin by checking the current Git status and initiating the rebase. For each conflict encountered, attempt to resolve it using standard merge conflict resolution practices (accepting ours, theirs, or both). After resolving conflicts, test that the code compiles and passes basic validation. Continue this loop until either the rebase completes successfully or you reach 10 iterations. Do not proceed if there are uncommitted changes in the working directory.
Self-pace this loop. After each iteration, run `git rebase` and evaluate the output, and only continue if the exit condition is not met (Rebase successful). Stop when the exit condition passes or 10 iterations are reached. Give a short status update each pass.