How to merge branches with Magit using the new commit object?

It seems that I cannot combine merges with Magit for Emacs without inserting them into the current branch sequentially. Sometimes after merging, a new commit object is created (this is what I want), sometimes commits are issued.

I just want to do "git merge --no-ff topicbranch" in Magit.

So, how do I apply the -no-ff flag / create a new object rule using Magit?

+4
source share
1 answer

Maybe because this patch was included in the current Magit?

(defun magit-manual-merge (rev) - (interactive (list (magit-read-rev "Manually merge" (magit-guess-branch)))) + (interactive (list (magit-read-rev (concat "Manually merge" + (if current-prefix-arg " (squashed)" "")) + (magit-guess-branch)))) (if rev - (magit-run-git "merge" "--no-ff" "--no-commit" + (magit-run-git "merge" "--no-commit" (if current-prefix-arg "--squash" "--no-ff") (magit-rev-to-git rev)))) 

If you want to compress the merge (use git to avoid creating a merge), use the prefix argument with the command ( @kbd{CU m} )

Are you using a prefix argument?

+3
source

Source: https://habr.com/ru/post/1310530/


All Articles