git merge --no-ff是什么意思
phpcn_u1582
phpcn_u1582 2017-04-28 09:05:23
0
3
1009

--no-ff是什么意思??
和 git merge --squash 有什么区别???

phpcn_u1582
phpcn_u1582

reply all(3)
巴扎黑

--no-ff refers to forcibly turning off the fast-forward method.

The fast-forward method means that when conditions permit, git directly points the HEAD pointer to the head of the merged branch to complete the merge. It belongs to the "fast forward mode", but if you delete the branch in this case, the branch information will be lost. Because no commit is created during this process

git merge --squash 是用来把一些不必要commit进行压缩,比如说,你的feature在开发的时候写的commit很乱,那么我们合并的时候不希望把这些历史commit带过来,于是使用--squashMerge. At this time, the file is the same as after the merge, but HEAD will not be moved or submitted. An additional commit is needed to "wrap it up" and then complete the final merge.

Summary:
--no-ff:不使用fast-forward方式合并,保留分支的commit历史
--squash: Do not use the fast-forward method to merge, retain the commit history of the branch

--squash: Use the squash method to merge, compress multiple branch commit histories into one

🎜
左手右手慢动作

http://git-scm.com/docs/git-merge

Create a merge commit even when the merge resolves as a fast-forward. This is the default behaviour when merging an annotated (and possibly signed) tag.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template