Git Sync

同步远程代码

gitbobobo b36c307 567 B Updated

File contents

同步 git 远程并解决冲突,使本地和远程保持一致(推送到远程)。

同步要求

  • 同步前确保工作区干净:先检查 git status --porcelain,若有未提交变更先完成提交(按 git-commit 工作流),再同步,避免 rebase / merge 时产生冲突或丢失改动
  • 优先通过 rebase 保持线性历史
  • 禁止直接丢弃提交内容,必须根据提交时间理解修改意图
  • 冲突需先理解双方修改意图再解决,必要时征求用户意见

gitbobobo/skills/tree/main/skills/godbobo/general/git-sync commit b36c30752c

Frequently asked questions

npx skillmds@latest add gitbobobo/git-sync