Git 高级
Amanda Crawford-Adamo
Software and Data Engineer

Git 合并命令:
git merge

什么是快进合并?
$$
不建议使用

Git 快进合并(默认)
git checkout main
git merge feature_branch
强制快进合并
git merge <branch> --ff-only
示例
git checkout main
git merge feature_branch --ff-only

什么是递归合并?
$$
不建议使用的情况

递归合并命令:
git merge --no-ff <branch>
示例
$ git checkout main
Switched to branch 'main'
Your branch is up to date with 'origin/main'.
$ git merge --no-ff feature_branch
Merge made by the 'recursive' strategy.
...

快进合并命令
git merge <branch_name> # 默认命令
git merge --ff-only <branch_name> # 强制快进合并
递归合并命令
git merge --no-ff <branch_name>
Git 高级