...
Apache | The main and official repositories | |
Github | Mirrors from the ASF repositories, used to accept contributions and do code reviews |
Rules of thumb
Every contribution is a piece of intellectual property. This is the precious sustenance that nourishes our project. Please treat it with respect. If it's sufficiently complex, or from a large corporate entity, ensure there is an ICLA or CCLA on file that covers the contribution. Asking in #jclouds or #asf will probably be the easiest way to get an answer.
- ALWAYS give credit where it is due, ensure EVERY merged commit reflects properly the individual who authored that commit. Preserve both the name and email address.
Ensure your name and email address are there as the committer prior to pushing it to the Apache repositories. Please read the 'which hat' guide before deciding whether to use your @apache.org, personal or other email address.
- Always strive for linear commit history, avoid merge commits while pulling in contributor's changes.
...
Code Block | ||
---|---|---|
| ||
git clone https://git-wip-us.apache.org/repos/asf/jclouds.git cd jclouds |
2. Fetch the branch of the user you want to merge from
Code Block | ||
---|---|---|
| ||
git fetch https://github.com/user-to-merge-from/jclouds.git branch-to-merge-from |
2.1. If you commonly merge from a particular user, you'll want to add their repo as a remote to make fetching branches easier.
Code Block | ||
---|---|---|
| ||
git remote add user-to-merge-from https://github.com/user-to-merge-from/jclouds.git
git fetch user-to-merge-from |
...
Configure a github remote to also fetch the pull requests, and checkout them as follows (for a complete guide refer to the GitHub howto):
Code Block | ||
---|---|---|
| ||
git remote add github git@github.com:jclouds/jclouds.git git config --local --add remote.github.fetch '+refs/pull/*/head:refs/remotes/github/pr/*' # Now when fetching you will see all the pull requests (you can checkout them with "git checkout github/pr/99"): git fetch github * [new ref] refs/pull/98/head -> github/pr/98 * [new ref] refs/pull/99/head -> github/pr/99 |
...
Code Block | ||
---|---|---|
| ||
git push origin master # Or the appropriate branch |
From a patch file
1. Save the patch from the Github patch link (just append '.patch' to the pull request link to get it). This patch will keep the authorship of the commit, so we should use it instead of the diff.
...