I'd rather use regular text editing functions when rebasing instead of learning magit's bindings.
Is there a way to use magit but disable git-rebase-mode
?
Emacs Stack Exchange is a question and answer site for those using, extending or developing Emacs. It only takes a minute to sign up.
Sign up to join this communityYou can remove git-rebase
from auto-mode-alist
:
(require 'cl-lib)
(setq auto-mode-alist
(cl-remove-if (lambda (x) (eq (cdr x) 'git-rebase-mode))
auto-mode-alist))
(setq auto-mode-alist (rassq-delete-all 'git-rebase-mode auto-mode-alist))
works, without cl-lib.
Jun 19, 2020 at 4:42
Adding another answer for completeness, when using use-package
, this needs to be done from :init
, eg:
(use-package magit
:init
;; Don't use magit for interactive rebase
;; (has own entire key-map, doesn't allow text-file editing).
(setq auto-mode-alist (rassq-delete-all 'git-rebase-mode auto-mode-alist)))
:config
rather than :init
, because at least when used with git-commit
mode, doing a git commit --amend
adds the 'git-rebase-mode
back to the alist.