开发者

How to prevent merge from falling back to normal merge strategy when a fast-forward merge is not possible?

开发者 https://www.devze.com 2023-03-06 21:27 出处:网络
The git merge command has an option to perform开发者_如何学Go fast-forward merge, but this is not what I want, because if it can\'t do a fast-forward merge, it uses the normal merge.

The git merge command has an option to perform开发者_如何学Go fast-forward merge, but this is not what I want, because if it can't do a fast-forward merge, it uses the normal merge.

Is there a git command which only performs a fast-forward merge (from the tracked remote branch) and does nothing if the fast-forward merge is not possible?


From the git-merge man page:

--ff-only

Refuse to merge and exit with a non-zero status unless the current HEAD is already up-to-date or the merge can be resolved as a fast-forward.

0

精彩评论

暂无评论...
验证码 换一张
取 消