Skip to content

Instantly share code, notes, and snippets.

@erikmd
Created August 13, 2023 13:40
Show Gist options
  • Select an option

  • Save erikmd/8f1e892abb997fcb63ea2359137f4ae9 to your computer and use it in GitHub Desktop.

Select an option

Save erikmd/8f1e892abb997fcb63ea2359137f4ae9 to your computer and use it in GitHub Desktop.
Installation and use of magit+forge in GNU Emacs
#+TITLE: Magit/Forge and GitHub
#+AUTHOR: Érik Martin-Dorel
#+DATE: 2021-08-16
#+OPTIONS: toc:nil
#+LATEX_CLASS_OPTIONS: [a4paper,11pt]
#+LATEX_HEADER: \usepackage{lmodern}
#+LATEX_HEADER: \usepackage[english]{babel}
#+LANGUAGE: en
** [[https://magit.vc/][Magit]]
*** Installation
See https://gist.github.com/erikmd/82c4b2a50a77c98e8fe6318530c531b7
** [[https://magit.vc/manual/forge/][Forge]]
*** 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
- https://emacsair.me/2018/12/19/forge-0.1/
: C-x g b y
: TAB(Pull requests)
: RET / C-c C-w
: C-c C-n(new post)
: C-c C-e(edit post / metadata)
: C-c C-c / C-c C-k
- https://magit.vc/manual/forge/
- https://magit.vc/manual/forge/Usage.html#Usage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment