git merge -h
usage: git merge [<options>] [<commit>...]
or: git merge --abort
or: git merge --continue
-n do not show a diffstat at the end of the merge
--stat 在合并结束时显示 diffstat
--summary (synonym to --stat)
--log[=<n>] add (at most <n>) entries from shortlog to merge commit message
--squash create a single commit instead of doing a merge
--commit 如果合并成功则执行提交 (default)
-e, --edit edit message before committing
--cleanup <mode> how to strip spaces and #comments from message
--ff 允许 fast-forward (default)
--no-ff 禁用 Fast forward
--ff-only 如果无法进行 Fast forward 则中止
--rerere-autoupdate update the index with reused conflict resolution if possible
--verify-signatures verify that the named commit has a valid GPG signature
-s, --strategy <strategy>
merge strategy to use
-X, --strategy-option <option=value>
option for selected merge strategy
-m, --message <message>
合并提交消息 (for a non-fast-forward merge)
-F, --file <path> read message from file
-v, --verbose be more verbose
-q, --quiet be more quiet
--abort 中止当前正在进行的合并
--quit --abort but leave index and working tree alone
--continue 继续当前正在进行的合并
--allow-unrelated-histories
allow merging unrelated histories
--progress force progress reporting
-S, --gpg-sign[=<key-id>]
GPG sign commit
--autostash automatically stash/stash pop before and after
--overwrite-ignore update ignored files (default)
--signoff add a Signed-off-by trailer
--no-verify 绕过 pre-merge-commit 和 commit-msg 钩子
解决:
merge
添加 --no-ff
参数 即可。