sync

Syncs a session branch with its upstream or publishes it to a remote.

Updated Aug 30, 2026
One-click install
npx skills add https://github.com/Tyrizx/Tyrizx --skill sync-tyrizx
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: sync
Source: https://github.com/Tyrizx/Tyrizx/tree/main/src/vs/sessions/skills/sync
Command: npx skills add https://github.com/Tyrizx/Tyrizx --skill sync-tyrizx

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Keeping a working branch in sync with its upstream remote involves multiple Git steps—fetching, checking ahead/behind counts, rebasing, resolving conflicts, and pushing—which are easy to get wrong or forget. ## Core Features & Use Cases - Upstream Sync: Fetches the upstream remote, checks ahead/behind counts, rebases onto the upstream tracking branch, and pushes local commits. - Branch Publishing: Publishes a branch without an upstream to a chosen remote using git push -u, asking which remote when multiple exist. - Safe Conflict Handling: Guides rebase conflict resolution, supports aborting the rebase, and never force-pushes or skips hooks without explicit user approval. - Use Case: You finished work on a feature branch and want to pull the latest main-branch changes and push your commits—invoke this Skill to rebase and push in one guided flow. ## Quick Start Ask the assistant to sync my current branch with its upstream and push any local commits.

Frequently Asked Questions about sync

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I sync my Git branch with upstream changes?▼

Fetch the upstream remote first, then check ahead/behind counts with git rev-list --left-right --count HEAD...@{u}. If behind, rebase onto the upstream tracking branch with git rebase @{u}, then push any local commits.

How do I publish a local Git branch to a remote?▼

Use git push -u <remote> HEAD to publish the current branch and set its upstream in one step. If multiple remotes exist, choose which one to publish to before running the command.

What should I do when a Git rebase hits merge conflicts?▼

Resolve conflicts by preserving the intent of both sides, stage the resolved files with git add, and run git rebase --continue. If resolution is unclear or you want to stop, use git rebase --abort to return to the pre-rebase state.

Is it safe to force-push after rebasing a branch?▼

Force-pushing after a rebase rewrites remote history and should only happen with explicit approval. This workflow never uses --force or --force-with-lease automatically and asks the user before doing so.

How do I verify my branch is fully synced with upstream?▼

Check that git status --porcelain shows a clean working tree and that git rev-list --left-right --count HEAD...@{u} reports 0 ahead and 0 behind. For newly published branches, confirm the upstream with git rev-parse --abbrev-ref @{u}.