假设现有分支develop、test。需要将test合并到develop分支。
首先git checkout develop。
git merge test
test分支会合并到develop,会有test分支提交信息,同时最后一条提交会是Merge branch 'test' into develop。
git merge test --no-commit
test分支会合并到develop,会有test分支提交信息,最后一条提交与test分支一致。
git merge test --squash
test分支会合并到develop,没有test分支提交信息,需要自行git commit。
网友评论