Frage

Ich kann nicht scheinen, um meine verschmilzt intakt mit Magit für Emacs zu bekommen, ohne sie in den aktuellen Zweig konsequent zu Quetschen. Manchmal ist ein neues Commit-Objekt wird nach der Zusammenführung erstellt (das ist, was ich will), manchmal Commits zerquetscht werden.

Ich möchte im Grunde nur tun 'git merge --no-ff topicbranch' in Magit.

So wie erzwingen ich den --no-ff-Flag / erstellen Sie neue Objektregel mit Magit?

War es hilfreich?

Lösung

Maybe because that patch has be 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 would like to squash the merge (have git avoid creating a merge commit) then use a prefix argument with the command (@kbd{C-U m})

Are you using a prefix argument?

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top