18 lines
564 B
Markdown
18 lines
564 B
Markdown
---
|
|
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.
|