Initial commit
This commit is contained in:
17
commands/sync.md
Normal file
17
commands/sync.md
Normal 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.
|
||||
Reference in New Issue
Block a user