LinuxCommandLibrary

git-sync

Synchronize local branch with remote

TLDR

Sync with remote

$ git sync
copy
Sync specific branch
$ git sync [branch]
copy
Sync with upstream
$ git sync upstream
copy

SYNOPSIS

git sync [remote] [branch]

DESCRIPTION

git sync synchronizes the current branch with its remote tracking branch. It combines fetch and rebase/merge into a single command for quick synchronization.
The command stashes local changes if needed, syncs with remote, then restores changes. It simplifies the common workflow of updating a branch.

PARAMETERS

REMOTE

Remote to sync with (default: origin).
BRANCH
Branch to sync (default: current).
--help
Display help information.

CAVEATS

Part of git-extras package. Behavior depends on configuration. May stash uncommitted changes.

HISTORY

git sync is part of git-extras, combining common synchronization steps into one command.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community