Sync the git remote and resolve conflicts so that the local and remote stay consistent (push to the remote).
Sync requirements
- Before syncing, ensure the working tree is clean: first check
git status --porcelain, and if there are uncommitted changes, complete the commit first (following the git-commit workflow), then sync, to avoid conflicts or losing changes during rebase / merge - Prefer rebase to maintain linear history
- It is forbidden to directly discard commit content; you must understand the intent of the changes based on commit times
- Conflicts must be resolved only after understanding the intent of both sides' changes; consult the user when necessary