Initial commit

This commit is contained in:
Zhongwei Li
2025-11-30 08:28:27 +08:00
commit 277c92829e
12 changed files with 317 additions and 0 deletions

17
commands/sync.md Normal file
View File

@@ -0,0 +1,17 @@
---
description: Sync branch with main/master and resolve conflicts
---
Sync current branch with main branch:
1. Fetch latest changes from remote
2. Identify the main branch (main or master)
3. Ensure working directory is clean (fail if uncommitted changes)
4. Rebase current branch on latest main
5. If conflicts occur:
- List all conflicting files
- Ask user how to proceed (abort, resolve manually, or auto-resolve if simple)
6. Run linters and fix any issues introduced
7. Report sync status
IMPORTANT: Never force-push without explicit confirmation.