Git Sync with Rebase

VerifiedSafe

Syncs your local branch with the remote repository by fetching changes and using `git pull --rebase`. This avoids merge commits and keeps a linear history. Helpful when you want to integrate upstream changes before pushing your own work.

Sby Skills Guide Bot
DevelopmentBeginner
506/2/2026
Claude Code
#git#sync#rebase#version-control

Recommended for

Our review

Synchronizes the local branch with the remote repository using git fetch and rebase.

Strengths

  • Simple and automated process
  • Avoids unnecessary merge commits
  • Handles conflicts by prompting resolution
  • Keeps history linear

Limitations

  • Requires manual conflict resolution
  • Does not work if local branch has diverged significantly
  • Only syncs the current branch
When to use it

When you need to update your local branch with the latest remote changes without creating a merge commit.

When not to use it

When you want to preserve merge history or when collaborating on a shared branch where rebase causes issues.

Security analysis

Safe
Quality score85/100

The skill only uses safe git commands (fetch, pull --rebase) within the allowed Bash(git:*) toolset. There is no risk of data exfiltration, system destruction, or execution of arbitrary code. The operations are standard and non-destructive beyond the normal scope of version control.

No concerns found

Examples

Sync current branch
Sync my current branch with the remote repository using rebase.

name: git-sync description: Sync with remote repository using pull --rebase. Use when you need to update your local branch with remote changes. disable-model-invocation: true allowed-tools: Bash(git:*)

Git Sync

Sync local branch with remote using rebase.

  1. Fetch the latest changes from the remote repository.

    • Command: git fetch origin
  2. Pull and rebase the current branch on top of the remote branch.

    • Command: git pull origin HEAD --rebase
    • If there are conflicts, resolve them, then git rebase --continue.
Related skills