git merge dryrun

As noted previously, pass in the --no-commit flag, but to avoid a fast-forward commit, also pass in --no-ff, like so:

$ git merge --no-commit --no-ff $BRANCH

To examine the staged changes:

$ git diff --cached

And you can undo the merge, even if it is a fast-forward merge:

$ git merge --abort
posted on 2018-11-22 10:18  阿笨猫  阅读(449)  评论(0编辑  收藏  举报