The sync command ("synchronize this branch") updates the local Git workspace with what happened in the rest of the repository.
- pulls new commits for the current branch from its tracking and ancestor branches
- downloads new Git tags
- deletes the local branch if its tracking branch was deleted at the remote and the local branch doesn't contain unshipped changes
- local branches checked out in other Git worktrees don't get synced
--all parameter makes Git Town sync all local branches instead just the
--dry-run parameter allows to test-drive this command. It prints the Git
commands that would be run but doesn't execute them.
sync-perennial-strategy configures whether perennial branches merge their tracking branch or rebase against it.
sync-feature-strategy configures whether feature branches merge their parent and tracking branches or rebase against them.
If the repository contains a Git remote called
upstream and the
sync-upstream setting is enabled, Git Town
also downloads new commits from the upstream main branch.