GitHub Pull Requests

Variant a: User configures a local repository
Clone the github mirror of the Gentoo repository under the remote name "upstream" into the directory. (Replace with the directory of choice.

Step into the new directory, fork the Gentoo repository on GitHub and then add it under the remote name "github" to your local repository.

Variant b: Using the git repository as the primary portage tree
Add the following to the file:

Add the following, changing .

Then sync the repository.

Fork the Gentoo repository on GitHub And then add it under the remote name "github" to your local repository.

Step 3: GPG Configuration
Add the following to dirmgr.conf and gpg.conf respectively:

Now to generate the key:

Select the algorithm Set the key size Specify how long the key should be valid (No more then 5 years) Confirm the information is correct Set your name set your email Set your passphrase, and confirm it. It might take some time if you've chosen a high bit length key.

Retrieve your GPG public keyID via the following command:

The key id is the portion after the / on the line beginning with pub as shown in bold below. If you have more than one key with the specified UID you will need to select the correct key yourself from the list of returned keys. pub  rsa4096/0x000000000000000

Upload your key to the keyserver.

Note that under some circumstances it may be necessary to provide a keyID to the '--send-key' flag. For example

Finally, configure git to use the target key for code signing:

Step 5: User changes a package
Say you are making changes to package app-foo/bar. Create a local branch with your changes:

Make your changes and make sure to run repoman to check for basic errors:

Then commit your changes (if you're closing some bugs on Bugzilla, you can mention them here as suggested by GLEP66):

Step 5: User makes a pull request
Now that you've made your changes and updated your local branch, it's time to send it off to GitHub and make a PR (Pull Request) to the Gentoo Developers.

Start by pushing the branch with your changes to your GitHub repository:

Then create a pull request from your GitHub repository's local branch to the Gentoo repository's master branch. When your changes have been merged, you may delete your local repository's branch with:

Variant b: By means of the PRam tool
The PRam tool helps developers to merge pull requests. To merge GitHub PR #12345, enter your local gentoo.git checkout and run

see also https://github.com/mgorny/pram

External resources

 * GLEP 63
 * GLEP 66