Next: , Previous: , Up: Forge User and Developer Manual   [Contents][Index]


3 Initial Pull

To start using Forge in a certain repository, visit the Magit status buffer for that repository and type N / a (forge-add-repository). You are given a choice to pull all topics, all topics that were updated after a certain date, or only individual topics.

Beside adding the repository to the database, this also adds a new value to the Git variable remote.<remote>.fetch, which causes all pull-request refs (+refs/pull/*/head:refs/pullreqs/* for Github) to be fetched by Git.

Note that it is possible to use the same command to add any repository from a supported forge to the database, without cloning the Git repository first.

The initial fetch can take a while but most of the work is done asynchronously. Storing the information in the database is done synchronously though, so there can be a noticeable hang at the end. Subsequent fetches are much faster.

Fetching issues from Github is much faster than fetching from other forges, because making a handful of GraphQL requests, is much faster than making hundreds of REST requests.