:tools magit

A git porcelain for Emacs

1. Description

This module provides Magit, an interface to the Git version control system.

1.1. Maintainers

This module has no dedicated maintainers.

1.2. Module flags

+forge
Enable Forge; a porcelain for managing Git{hub,lab,ea,etc} issues and PRs from within Emacs. Will take a while on first run to build emacsql-sqlite, and to pull all issues.

1.4. Hacks

  • forge was modified to defer compilation of emacsql-sqlite until you try to use forge, rather than when magit first loads (which could be as soon as startup).
  • magit has been modified to recognize $XDG_CACHE_HOME/git/credential/socket.
  • magit has been modified to invalidate the projectile cache when you check out a new branch or commit.
  • magit has been modified to revert repo buffers (e.g. after changing branches) when you later switch to them, rather than all at once.

2. Prerequisites

This module requires git.

Forge will require a Github API token the first time you run forge-pull.

3. TODO Usage

This module has no usage documentation yet. Write some?

If you are new to Magit, see the Getting Started section of its project readme.

3.1. Forge

Quick start:

  1. Create a token from your forge:
  2. Register a username for your forge:

    $ git config --global github.user USERNAME
    
  3. Add the following to ~/.authinfo.gpg (replacing USERNAME and TOKENSECRET):

    machine api.github.com login USERNAME^forge password TOKENSECRET
    
  4. Start up M-x magit-status.
  5. Pull all forge topics with @ f f (evil users).

4. Configuration

This module’s configuration documentation is incomplete. Complete it?

4.1. Enable Gravatars

;; add to $DOOMDIR/config.el
(setq magit-revision-show-gravatars '("^Author:     " . "^Commit:     "))

This will enable gravatars when viewing commits. The service used by default is Libravatar.

4.2. Enable granular diff-highlights for all hunks

By default, changes are highlighted linewise for all but the selected hunk. This has performance reasons. You can enable character-wise highlights for all visible hunks with:

;; add to $DOOMDIR/config.el
(after! magit
  (setq magit-diff-refine-hunk 'all))

5. Troubleshooting

There are no known problems with this module. Report one?

6. TODO Appendix

This module has no appendix yet. Write one?