4 Getting Started

Much like Git stores information in a local repository and does not require a constant internet connection, Forge retrieves additional information using a forge’s API and stores that in a local database.

Forge’s equivalent of git clone is forge-add-repository, which has to be run, before most of Forges features become available in the local clone of a Git repository.

N / a (forge-add-repository)

This command guides the user through the process of adding a repository to the local database.

Note that it is possible to add a repository to the local database, without pulling all the data, which is useful if you just want to create a single issue or pull-request in a repository, but are not interested in existing topics, e.g., because you do not regularly contribute to that repository.

Also note that you can add a repository to the local database, even if no local Git clone exists.

Like with Git, you have to explicitly pull remote changes, at your leisure, using forge-pull.

f n (forge-pull)
N f f

This command uses a forge’s API to fetch topics and other information about the current repository, and stores the fetched information in the database.

If the current repository isn’t being tracked in the local database yet, then this command pivots to behave like forge-add-repository.

Forge adds two additional sections to Magit’s status buffer, which list open and/or pending issues and pull-requests. Typing RET, while the cursor is on a topic section, shows more information about that topic in a separate buffer. Typing RET on a topic list section, shows that list in a separate buffer, where you can apply different filters.

The other main entry point to the functionality provided by Forge is the forge-dispatch menu.

N (forge-dispatch)

This prefix command is available in all Magit buffers and provides access to most of the available Forge commands. See the following sections for information about the available commands.