Sync local branches with remote branches.
Sync the current local branch with its remote branch
Sync the current local branch with the remote main branch
Sync without cleaning untracked files
git sync [--soft] [ <remote> <branch> ]
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).
--soft or -s
Add this flag if you want to preserve untracked files.
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
Written by Takuma Yamaguchi <email@example.com>