Emacs' git-link tutorial

For those using the best text editor, there’s a cool package called git-link that I use to help speed up patches and bug reports, linking to the actual source code, rendered online. Here’s my workflow that I use for Nyxt and other projects:

  1. Install the package, which I use straight.el for:
(use-package git-link
  (setq git-link-open-in-browser nil
        git-link-use-commit t))
  1. If you have a fork checked out, set the upstream repository URL and then configure the git-link specific local Git settings, at least the git-link.remote setting, something like the following:
$ git config --local --get git-link.remote

You could also set the Elisp variable git-link-default-remote to something like upstream.

  1. Select snippets of code and run git-link or similar commands, copying the resulting URLs to your bug report, code review, etc.

  2. Profit! :heavy_dollar_sign::heavy_dollar_sign::heavy_dollar_sign:

And, of course, if you find this package useful, don’t forget to smash that Like button star Shaw’s work on GitHub!