git sync updates all local branches from their remotes.
Install with brew.
$ brew install arbourd/tap/git-sync$ git sync [options]# Fetch, then fast-forward every local branch
$ git sync
Updated branch main (was 8915328).
Updated branch feature-123 (was 7c24329).| Option | Description |
|---|---|
--prune |
Delete merged branches whose upstream is gone |
-h, --help |
Show usage |
-v, --version |
Show the version |
Delete branches whose upstream is gone and whose work is already in the default branch, even if it was rebased or squashed.
$ git sync --prune
Deleted branch feature-123 (was 7c24329).Without --prune, no branch is ever deleted.
git-sync is an extraction of the sync command from github/hub and retains its original MIT license.
An agent skill is available for AI coding agents.