| name | git-workflow |
| description | Git workflow patterns, commit conventions, and edge case handling for Antigravity projects |
Git Workflow Skill
Standard Git workflow guidelines for working with Antigravity, including commit conventions, branching strategies, and handling edge cases.
📋 Commit Message Convention
Format
<type>: <short description>
[optional body]
[optional footer]
Types
| Type | When to use | Example |
|---|
feat | New feature | feat: Add output folder selection to Excel Merge |
fix | Bug fix | fix: Handle corrupt Excel files gracefully |
docs | Documentation only | docs: Update README with installation guide |
refactor | Code changes that neither fix a bug nor add a feature | refactor: Extract merge logic to separate function |
style | Formatting, missing semi-colons, etc; no code change | style: Fix indentation in main.py |
test | Adding missing tests or correcting existing tests | test: Add unit tests for excel_merge.py |
chore | Build process or auxiliary tool changes | chore: Update requirements.txt |
Rules
- Use lowercase for type
- No dot at the end of the description
- Description must be short, ≤50 chars
- Use imperative mood: "Add feature" not "Added feature"
🌿 Branching Strategy
Simple Flow (Solo/Small Team)
main ──────────────────────────────────
└── feature-x ──┘
- Work on
main or short-lived feature branches
- Merge/push frequently
Git Flow (Team/Production)
main ─────────────────────────────────────────
└── develop ────────────────────────────────
├── feature/add-watermark ──┤
└── feature/batch-resize ───┘
🔧 Workflow Process
1. Before Coding
git status
git pull origin main
2. During Coding
git add <files>
git add -A
git status
3. Commit
git commit -m "feat: Add new feature"
4. Push
git push origin main
⚠️ Edge Cases & Solutions
1. Push Rejected (Remote has new commits)
! [rejected] main -> main (fetch first)
error: failed to push some refs
Solution:
git pull --rebase origin main
git push origin main
Or:
git pull origin main
git push origin main
2. Conflict on Pull/Merge
CONFLICT (content): Merge conflict in main.py
Solution:
- Open conflicted file, look for markers:
<<<<<<< HEAD
your_code()
=======
their_code()
>>>>>>> origin/main
- Choose correct code, remove markers
- Stage and commit:
git add main.py
git commit -m "fix: Resolve merge conflict in main.py"
3. Committed Wrong File (Not Pushed)
git reset --soft HEAD~1
git reset HEAD <file>
git commit -m "correct message"
4. Wrong Commit Message (Not Pushed)
git commit --amend -m "feat: Correct message"
5. Pushed Wrong Commit
⚠️ Be careful with force push on shared branches!
git revert HEAD
git push origin main
6. Ignore Tracked File
echo "file_to_ignore.txt" >> .gitignore
git rm --cached file_to_ignore.txt
git commit -m "chore: Stop tracking file_to_ignore.txt"
7. Large File Rejected
remote: error: File xyz.exe is 123.00 MB; this exceeds the file size limit
Solution:
- Add to
.gitignore:
*.exe
*.app
*.dmg
- Remove from history:
git filter-branch --force --index-filter \
"git rm --cached --ignore-unmatch path/to/large-file" \
--prune-empty -- --all
Or use BFG Repo-Cleaner (faster):
bfg --delete-files "*.exe"
git push --force
8. View Commit History
git log --oneline -10
git log --graph --oneline
git log --author="name"
git log -- path/to/file
9. Revert to Old Version
git show abc123:path/to/file.py
git checkout abc123 -- path/to/file.py
git reset --hard abc123
📝 Quick Reference Commands
| Situation | Command |
|---|
| Check status | git status |
| View diff | git diff |
| Stage all | git add -A |
| Commit | git commit -m "msg" |
| Push | git push origin main |
| Pull | git pull origin main |
| View log | git log --oneline -5 |
| Undo last commit | git reset --soft HEAD~1 |
| Amend message | git commit --amend -m "new msg" |
| Discard changes | git checkout -- file.py |
| Create branch | git checkout -b feature-x |
| Switch branch | git checkout main |
| Merge branch | git merge feature-x |
| Delete branch | git branch -d feature-x |
🤖 Antigravity Integration
When Antigravity performs git operations, it will:
- Verify before commit:
git status to check staged files
- Use semantic commits: Type + description according to convention
- No force push unless requested by user
- Ask user when encountering conflicts or edge cases
Good Request Examples:
- "Commit and push with message 'feat: Add excel merge'"
- "Create branch feature/add-watermark and push"
- "Show 5 latest commits"
Clarification Needed Examples:
- "Undo commit" → "Has the commit been pushed? If no use reset, if yes use revert"
- "Reset all" → "Do you want soft reset (keep changes) or hard reset (lose changes)?"
🤖 Agentic Protocol
Skill Metadata
- Version: 1.0.0
- Last Updated: 2026-01-27
1. Activation Log
When activating this skill, print:
"🎯 [SKILL ACTIVATED] git-workflow v1.0.0"
"📋 Parameters:"
" - Action: [commit|push|pull|rebase]"
" - Branch: [branch_name]"
" - Message: [commit_message_preview]"
2. User Confirmation
Before pushing or destructive actions:
"I'll execute 'git [command]' on branch '[branch]'. Proceed? [Y/n]"
3. Completion Log
- Success: "✅ [git-workflow] Git operation successful. Hash: [short_hash]"
- Error: "❌ [git-workflow] Git Error: [output_tail]"