Syncs local and remote branches safely. Use for fetch/pull/rebase/push workflows, conflict handling, and branch alignment before merge.
Install
npx skillscat add erinrugas/artisan-agents/git-sync Install via the SkillsCat registry.
SKILL.md
Git Sync Skill
When to Apply
- User asks to sync with remote.
- Branch is behind base branch.
- Pre-PR branch cleanup is needed.
Workflow
- Fetch latest refs.
- Choose strategy:
- Fast-forward pull when possible.
- Rebase for linear history.
- Merge when preserving branch topology is required.
- Resolve conflicts and re-validate locally.
- Push safely (
--force-with-leaseonly after rebase when necessary).
Safety
- Never force-push protected branches.
- Prefer explicit base branch in commands.