I am excited to announce the release of Magit version 2.13, consisting of 166 commits since the last feature release two month ago. The release notes can be found here.
Magit is a text-based Git user interface that puts an unmatched focus on streamlining workflows. Commands are invoked using short mnemonic key sequences that take the cursor’s position in the highly actionable interface into account to provide context-sensitive behavior.
With Magit you can do nearly everything that you can do when using Git on the command-line, but at greater speed and while taking advantage of advanced features that previously seemed too daunting to use on a daily basis. Many users will find that by using Magit they can become more effective Git user.
For more information about Magit, see https://magit.vc and these blog posts.
As announced earlier older Emacs and Git versions won’t be supported much longer. This is the last Magit release to support Emacs 24.4 and Git 1.9.4. Going forward at least Emacs 25.1 and Git 2.4 are required.
Additionally many functions and variables that have been declared obsolete for a while now are going to be removed after this release.
All of these changes will happen on master
, the development branch.
Note that the snapshot packages on Melpa are built from that branch.
If you cannot update Emacs and/or Git now, then you should pin Magit
to Melpa-Stable to stick with this release (and bugfix releases) for
the time being.
Many changes in this release are related to file-visiting buffers in one way or another. The next release will also focus on files and the buffers visiting them.
Because there aren’t yet any Magit-specific conventions to build on and because the newly added functionality in many cases is still in its early stages and subject to changed, some of the new commands mentioned below do not have a default key binding yet, or else their binding might change in the near future.
Augmenting a file- or blob-visiting buffer with blame information was completely rewritten, making the implementation more robust and adding many new features.
As before, blame commands (and other file-related commands) can be
invoked from the file popup, which is available on C-c M-g
in
file-visiting buffers, if global-magit-file-mode
is enabled.
What changed is that this mode is now enabled by default.
In addition to the two blame types supported by the Git porcelain, “What commit added this line?” and (the only marginally useful) “What is the last commit that still has this line?”, Magit now also provides a third type, “What commit removes this line?”. The latter two types are only available in blob-visiting buffers, but not in buffers that visit a file in the working tree.
By default blaming still temporarily makes the buffer read-only, but
it is now possible to turn off read-only-mode
, if so desired. The
new option magit-blame-read-only
controls whether blaming turns on
read-only-mode
initially. The new command magit-blame-echo
provides another way to blame without turning on read-only-mode
,
regardless of the value of magit-blame-read-only
mode.
When the current buffer contains blame information, the new commands
magit-blame-visit-file
and magit-blame-visit-other-file
visit
blobs related to the current chunk. There are no default bindings
for these commands yet.
Blame information can now be displayed using several different
“styles”. Use c
to cycle through the currently defined styles
and edit magit-blame-styles
to modify existing styles and add
more styles.
The new command magit-log-trace-definition
, which is available
from the file popup, can be used to show a log with diffs for the
definition at point. Likewise magit-diff-trace-definition
can be
used to do the same from within a diff, where C-c C-t
is bound to
it.
The new command magit-edit-line-commit
, which is available from
the file popup (on e
), can be used to edit the commit that added
the current line. Likewise magit-diff-edit-hunk-commit
can be
used to do the same from within a diff, where C-c C-e
is bound to
it. The editing is usually done using an interactive rebase that
stops at the appropriate commit.
These last two commands are disabled by default because one might
easily end up editing an already published commit. Additionally
the new option magit-published-branches
provides a new safety-net.
If you try to modify a commit that has been pushed to one of these
branches already, then you are now being asked whether you really
want to do that. Beside these new commands, amend and rebase
commands may also ask for confirmation, but do not rely on this
additional safety-net exclusively, there are edge-cases that are
ambiguous and are not always handled as you might have expected.
This release also contains other minor improvements, bug fixes, typo fixes, and documentation fixes; some of which are mentioned in the release notes.
Comments on Reddit.