AGENT SKILL
git-sync
Rebase current branch onto main to sync latest changes
- License 许可
- Apache-2.0
- 最近更新
- 2026-11-14
- Stars
- ★ 0
- Forks
- 1
01 前言 Front Matter
- name
- git-sync
- description
- Rebase current branch onto main to sync latest changes
- argument-hint
- optional target branch (defaults to main)
- disable-model-invocation
- false
03 SKILL.md 正文
Context
- Current branch: !
git branch --show-current - Working tree clean: !
git status --short - Commits ahead of main: !
git log --oneline main..HEAD 2>/dev/null - Commits behind main: !
git log --oneline HEAD..origin/main 2>/dev/null
Your task
Sync the current feature branch with the latest main using rebase, keeping history linear.
Steps
- Ensure working tree is clean. If not, abort and warn.
- Fetch latest:
git fetch origin - Rebase onto main:
git rebase origin/main - If conflicts occur during rebase, report the conflicting files and stop. Do not auto-resolve. Inform the user they can abort with
git rebase --abort. - If the branch was previously pushed, inform the user they need to force push:
git push --force-with-lease - Confirm result with
git log --oneline --graph -5
Rules
- Always use rebase (not merge) to sync from main — keeps feature branch history linear
- Never run
git push --force-with-leasewithout informing the user first - If the branch is shared with others (multiple collaborators), warn that rebase rewrites history and suggest
git merge mainas a safer alternative
$ARGUMENTS
04 同仓库更多 Skills
video-frame-extraction
Extract frames from video files and save them as images using OpenCV
★ 0
openai-vision
Analyze images and multi-frame sequences using OpenAI GPT vision models
★ 0
image-ocr
Extract text content from images using Tesseract OCR via Python, including structured field extraction from receipts and forms
★ 0
video-frame-extraction
Extract frames from video files and save them as images using OpenCV
★ 0
openai-vision
Analyze images and multi-frame sequences using OpenAI GPT vision models
★ 0
image-ocr
Extract text content from images using Tesseract OCR via Python, including structured field extraction from receipts and forms
★ 0