Skip to content

Instantly share code, notes, and snippets.

@aclisp
Last active July 7, 2020 07:53
Show Gist options
  • Save aclisp/5eed80ef08ba939c6e1873ddfa926b27 to your computer and use it in GitHub Desktop.
Save aclisp/5eed80ef08ba939c6e1873ddfa926b27 to your computer and use it in GitHub Desktop.
Git Workflow
  • 拉开发分支 git checkout -b {branch} master
    • 有改动后, git push --set-upstream origin {branch}
  • 跟上 master 的最新改动
    • git checkout {branch}
    • git fetch origin
    • git rebase origin/master
  • 自己的分支,合并多次小提交
    • git rebase -i 3a4226b
    • 请注意3a4226b这个版本是不参与合并的,可以把它当做一个坐标
    • git push origin +{branch}
  • 开发分支合并回 master
    • git checkout master
    • git merge {branch}
    • git branch -d {branch}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment