git-sync(1)

git-sync1

Sync local branch with remote branch

Usage

git sync [--soft] [--force] [<remote> <branch>]

Overview

Sync local branch with <remote>/<branch>.

When <remote> and <branch> are not specified on the command line, upstream of local branch will be used by default.

All changes and untracked files and directories will be removed unless you add -s(--soft).

Options

--soft or -s

Add this flag if you want to preserve untracked files.

--force or -f

Add this flag to disable interaction.

Examples

Sync local branch with its upstream

$ git sync

Sync local branch with origin/master

$ git sync origin master

Sync without cleaning untracked files:

$ git sync -s origin master

Sync without interaction:

$ git sync -f

Releases

5 releases since Debian 9 (Stretch); the text changed 4 times.

  1. 9
  2. 10
  3. 11
  4. 12
  5. 13

Author

Written by Takuma Yamaguchi <[email protected]>

Reporting bugs

<https://github.com/tj/git-extras/issues>

From git-extras 7.3.0-1 in Debian 13 (Trixie). Parsed by carta from the page's man source.