Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

From a GitHub pull request  

1. Clone the canonical ASF repo

Code Block
languagebash
git clone https://gitbox.apache.org/repos/asf/jclouds.git 
cd jclouds

2. 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
languagebash
git remote add github git@github.com:apache/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
3. Cherry pick the commit you want to merge 
Code Block
languagebash
git cherry-pick hash-to-merge

4. Push the commit (you'll want to setup a .netrc file to make this easy, see Committers: Getting Started) 

...

languagebash

...

Just merge it normally from the GitHUb site.

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. 

...