Git Branch Sync
Safely sync an upstream branch or publish the current session branch to a remote.
The skill explicitly forbids unapproved force-pushes, skipped hooks, and rewriting or dropping commits without asking, and directs the user to decide when conflict resolution is unclear. However, it instructs the agent to invoke a commit skill for uncommitted changes, while fetch, rebase, and push have external repository effects; stepwise confirmation, sensitive-data guidance, detailed data-flow disclosure, and a stronger rollback model are missing, so points are deducted.
The workflow is mostly internally consistent and includes upstream detection, conflict handling, rebase abort, and final state checks. It does not sufficiently specify diagnosable behavior for missing commit tooling, divergent histories, remote or authentication failures, hook failures, or incomplete pushes, and static review cannot reproduce the key paths, so the score remains moderate.
Triggers cover syncing, pulling, rebasing, pushing, publishing, and setting an upstream, with a clear primary audience and scenario. Boundaries for read-only previews, non-Git branches, and complex divergence are not explicit, and Chinese-language interaction or mainland-China network reachability is not addressed, so points are deducted.
The document has clear metadata, guidelines, workflow, and validation sections. Repository context supplies MIT licensing, version information, and verified Microsoft provenance, but the skill lacks installation or dependency notes, examples or FAQs, changelog/versioning, named maintenance responsibility, and an independent update path; assumptions about the commit skill are also unexplained.
For ordinary branch synchronization and publication, the command sequence is directly actionable and includes post-operation checks. Automatic handling of uncommitted changes, remote selection, divergent branches, and failure recovery still requires human judgment, and the files do not verify representative outputs or comparative benefit, so the static score is limited.
The skill's commands, constraints, and validation criteria are auditable, and the repository contains general CI and test infrastructure. The supplied CI evidence does not cover this skill's key paths, and there are no dedicated SKILL.md tests or third-party execution records, so verifiability is limited.
- Before execution, confirm whether working-tree changes should be committed and whether the selected remote and upstream are correct; committing is currently the default prerequisite.
- Rebase and push can alter or publish repository history; pause for user direction on divergence, authentication failure, hook failure, or conflicts.
- The documentation does not address mainland-China network reachability or provide dedicated automated regression evidence for this skill.
What it does & when to use it
This skill synchronizes the current session branch with its upstream branch or publishes it to a remote repository. It checks for uncommitted changes and upstream configuration before fetching, comparing branch divergence, rebasing, pushing, or setting tracking information. It explicitly avoids unapproved force-pushes and skipped push hooks. When conflict resolution is unclear, it asks the user to decide.
Checks for uncommitted work; determines whether the current branch has an upstream; with an upstream, runs git fetch, checks ahead/behind counts, and rebases when needed; pushes local commits after a successful rebase; without an upstream, publishes with git push -u <remote> HEAD; then verifies working-tree cleanliness, sync state, and upstream configuration.
- A developer wants to update the current branch from its upstream and confirm whether it is already synchronized.
- A developer needs to push local commits to an already configured upstream branch.
- A developer is publishing a branch for the first time and wants its remote tracking branch configured.
- A rebase conflict, rejected push, or potentially destructive history operation requires an explicit user decision.
Pros & cons
- Covers both branches with an existing upstream and first-time branch publication.
- Checks for uncommitted changes before synchronization and validates the final Git state.
- Clearly prevents unapproved force-pushes, skipped push hooks, and unrequested commit-history rewriting.
- Requires Git, remote repository access, and a usable working-tree state.
- Uncommitted changes must first be committed with the /commit skill; this skill does not define that commit workflow.
- It does not make ambiguous conflict decisions automatically and will not force-push after a history-rewriting rebase without approval.
- The source does not provide standalone installation steps or a test suite.
How to install
The README identifies the skill at src/vs/sessions/skills/sync/SKILL.md, but it does not document a standalone installation command. For the full repository, follow the repository's own process for obtaining microsoft/vscode; the source does not specify where an individual skill should be installed or how a client loads it.
How to use
In a client that supports the skill, make a request such as “sync the current branch,” “pull the latest upstream changes and rebase,” “push the current branch,” or “publish this branch and set its upstream.” Provide an explicit decision when conflict resolution or a force-push approval is requested.