HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

git sync — Sync local branches with remote branches. Part of `git-extras`. More information: <https://manned.or

Submitted by: @import:tldr-pages··
0
Viewed 0 times
commandlocalgit syncclibrancheswithremotesync

Problem

How to use the git sync command: Sync local branches with remote branches. Part of git-extras. More information: <https://manned.org/git-sync>.

Solution

git sync — Sync local branches with remote branches. Part of git-extras. More information: <https://manned.org/git-sync>.

Sync the current local branch with its remote branch:
git sync


Sync the current local branch with the remote main branch:
git sync origin main


Sync without cleaning untracked files:
git sync {{[-s|--soft]}} {{remote_name}} {{branch_name}}

Code Snippets

Sync the current local branch with its remote branch

git sync

Sync the current local branch with the remote main branch

git sync origin main

Sync without cleaning untracked files

git sync {{[-s|--soft]}} {{remote_name}} {{branch_name}}

Context

tldr-pages: common/git sync

Revisions (0)

No revisions yet.