Skip to content

Commit

Permalink
git 更新分支合并
Browse files Browse the repository at this point in the history
  • Loading branch information
wangdonghao committed Aug 7, 2020
1 parent 69bfafa commit a30651e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions 其它/工具/git.md
Original file line number Diff line number Diff line change
Expand Up @@ -177,9 +177,11 @@ git branch test # 创建 test 分支(但不切换
git checkout test # 切换到 test 分支
git checkout -b test # 创建并切换到 test 分支

git merge test # test 分支合并到主分支
git merge origin/master # origin/master 合并到主分支
git rebase master # master 分支合并到当前分支

# 当前分支未被修改时,merge 和 rebase 无区别
git merge test # test 分支合并到当前分支(将两个分支合并,新建一个 commit)
git merge origin/master # origin/master 合并到当前分支
git rebase master # master 分支合并到当前分支(当前分支重新执行另一个分支的全部 commit)

git branch -D test # 删除分支
```
Expand Down

0 comments on commit a30651e

Please sign in to comment.