See https://github.com/magit/magit/issues/3458 to learn how to figure out what is wrong.
See https://github.com/magit/magit/issues/3444 to learn why you did not get a more useful error message right away and that we are aware of this and will eventually do something about it.
You're using a package which is very opinionated about how things with Git should work, so don't be surprised if related Emacs configuration which works without Magit gets clobbered when you do use Magit.
In this instance, Magit uses git-commit.el which provides the variable git-commit-major-mode for controlling this.
If you want to control how things happen ...
If @phils would like to post an answer I would be happy to delete this one. Let me know by tomorrow.
As @phils suggested in the comments to the OP, the problem was solved by using the following in the ~/.gitconfig file:
ui = auto
The problem was caused by the following stanza in the ~/.gitconfig file
ui = true
tl;dr make sure MELPA archive is added (if you need magit)
I realized that magit is not in ELPA, it's in MELPA. I think I added MELPA archive back then, but that part of the config was supposedly lost owing to running several instances of Emacs, and orgmode editing the ~/.emacs file (adding agenda files).
No, it is not possible. diff-mode is just for showing and editing diffs; VersionControl what gets committed, and works only with files or sets of files:
[some] version control systems [...] are file-based: each file has its own [...] history [...]. [...] changeset-based [systems' commits] may include changes to several files, and the entire set of changes ...
As each 'diff' would be the entire file, that could be a very costly section to include, even if it were available (which I don't think is the case).
For mere viewing purposes you can, of course, use RET on an untracked file to visit it. Maybe not quite so convenient in some cases, but it's trivial; you don't have to view the file as a diff; and it has no ...
Adding another answer for completeness, when using use-package, this needs to be done from :init, eg:
;; 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)))
Magit tries to establish that binding automatically using global-magit-file-mode. However that does not actually work. It's a known bug. You didn't mention this mode so I don't know whether you are aware that this mode is supposed to define that binding. But since it doesn't actually work that doesn't matter.
You have to define the binding yourself by adding ...
These versions are also called "stages" and the command to pick on is magit-checkout-stage. You can invoke that using M-x of course, but you can also just press k (magit-discard) on the conflicting file to discard the other stages. (But be aware that this prompts you for which side to keep, not which side to discard.)
I have to admit that I saw upstream/master, though "not again" and then did not read your question properly. You can still learn something from the things I have said below, but you actually put the finger on a bug.
I have fixed the bug by using remote/branch...pr instead of branch...pr. remote/branch is much more likely to be up-to-date because pulling the ...
I had the same issue on macOS 10.15.5 Catalina. From a quick debug session I discovered that the server directory was also missing on my machine, like the other answer mentions.
I created it by hand, but this didn’t fix the issue.
In my case I had a Git project setup with submodules, and the submodule had .git/gitdir & .git/gitfile configurations with ...
I've never actually used the transient package before (which is what magit uses to create these cool menus), so instead of giving you the answer, I'll describe how to find it.
First, take a look at the definition of the the transient-define-prefix macro. There's no direct way to go to a macro definition, so start by visiting the source for magit-dispatch; ...