Slash Command

/sync-branch

Install
1
Install the plugin
$
npx claudepluginhub softaworks/agent-toolkit --plugin command-sync-branch

Want just this command?

Add to a custom plugin, then install with one command.

Description

Sync feature branch with the latest main branch.

Argument
target
Command Content
  1. Fetch latest upstream refs: git fetch origin --prune.
  2. Identify target branch (default main, or override via argument).
  3. Rebase current branch onto target:
    git rebase origin/${target:-main}
    
  4. Resolve any conflicts
  5. Force-with-lease push to update the PR:
    git push --force-with-lease origin $(git branch --show-current)
    
Stats
Stars955
Forks70
Last CommitJan 28, 2026
Actions

Other plugins with /sync-branch