Skip to content

Instantly share code, notes, and snippets.

@erikmd
Created August 13, 2023 13:40
Show Gist options
  • Save erikmd/8f1e892abb997fcb63ea2359137f4ae9 to your computer and use it in GitHub Desktop.
Save erikmd/8f1e892abb997fcb63ea2359137f4ae9 to your computer and use it in GitHub Desktop.
Installation and use of magit+forge in GNU Emacs

Magit/Forge and GitHub

Installation

See https://gist.github.com/erikmd/82c4b2a50a77c98e8fe6318530c531b7

Installation

<2021-08-16 Mon 19:00>

https://magit.vc/manual/forge/Getting-Started.html#Getting-Started

(use-package forge :after magit)

https://magit.vc/manual/ghub/Setting-the-Username.html#Setting-the-Username

git config --global github.user erikmd

https://magit.vc/manual/forge/Token-Creation.html#Token-Creation

https://github.com/settings/tokens

  • repo
  • user
  • read:org

https://magit.vc/manual/ghub/Storing-a-Token.html#Storing-a-Token

https://www.gnu.org/software/emacs/manual/html_node/auth/Help-for-users.html

C-x c-f ~/.authinfo.gpg RET
machine api.github.com login ziggy^forge password 012345abcdef...

https://magit.vc/manual/ghub/Github-Configuration-Variables.html#Github-Configuration-Variables

https://magit.vc/manual/forge/Initial-Pull.html#Initial-Pull

f y

or

M-x forge-add-repository RET

https://magit.vc/manual/forge/Repository-Detection.html#Repository-Detection

The convention is to name the upstream remote origin.

to use the upstream remote named “upstream”:

cd /path/to/repo
git config --local forge.remote upstream

https://magit.vc/manual/forge/Caveats.html#Caveats

If in doubt, then re-fetch an individual pull-request to ensure it is up-to-date using the command

M-x forge-pull-topic

https://magit.vc/manual/forge/Supported-Forges-and-Hosts.html#Supported-Forges-and-Hosts

Usage

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment