Use of git merge

In the actual development often used git merge operations. But submitted directly after in many cases we do not want to merge, git merge introduce two commonly used parameters here:

--no-commit

--no-commit parameter so that after the merger, in order to prevent the failure of the merger is not automatically submitted, can give the user a chance to review and modify merge results before submission. (This will not be merged into use after a commit)

git merge --no-commit dev.master // dev.master is to merge the branch name

--squash

--squash parameters when a merger occurs, the other branch from the current node after node common ancestor branch and other branches, up to the top node of the other branch will be compressed together, users can submit the review after, producing a the new node. (Soon to be merged into one consolidated repeatedly commit commit).

git merge --squash dev.master // dev.master is to merge the branch name

In PhpStorm uses:

Which checked "No commit": equivalent to using the --no-commit

Check the "Squash commit": equivalent to using --squash

Guess you like

Origin www.linuxidc.com/Linux/2019-06/158901.htm