git merge --no --ff -m “merge with no ff” 合并分支并警用Faster forward (快速合并模式)
合并分支时,加上–no-ff参数就可以用普通模式合并,合并后的历史有分支,能看出来曾经做过合并,而fast forward合并就看不出来曾经做过合并。
[root@localhost 222]# git checkout -b dev (切换分支)
切换到一个新分支 'dev'
[root@localhost 222]# vim aaa
[root@localhost 222]# git add aaa (添加到暂存区)
[root@localhost 222]# git commit -m "merge with no ff" (提交到仓库)
[dev 3851875] merge with no ff
1 file changed, 2 insertions(+)
[root@localhost 222]# git switch master (切换分支)
切换到分支 'master'
您的分支领先 'origin/master' 共 4 个提交。
(使用 "git push" 来发布您的本地提交)
[root@localhost 222]# git merge --no-ff -m "merge with no-ff" dev (合并分支并禁用快速合并模式&#