You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jclouds.apache.org by Apache Wiki <wi...@apache.org> on 2014/05/12 22:32:59 UTC

[Jclouds Wiki] Update of "Committers Guide" by IgnasiBarrera

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Jclouds Wiki" for change notification.

The "Committers Guide" page has been changed by IgnasiBarrera:
https://wiki.apache.org/jclouds/Committers%20Guide?action=diff&rev1=7&rev2=8

Comment:
Added how to fetch and checkout existing pull requests

  === From a GitHub pull request ===
  
   1. Clone the canonical ASF repo
-    {{{ 
+    {{{
     git clone https://git-wip-us.apache.org/repos/asf/jclouds.git
     cd jclouds
     }}}
   1. Fetch the branch of the user you want to merge from
-    {{{ 
+    {{{
-    git fetch https://github.com/user-to-merge-from/jclouds.git branch-to-merge-from 
+    git fetch https://github.com/user-to-merge-from/jclouds.git branch-to-merge-from
     }}}
-  1. If you commonly merge from a particular user, you'll want to add their repo as a remote to make fetching branches easier.
+    a. If you commonly merge from a particular user, you'll want to add their repo as a remote to make fetching branches easier.
     {{{
     git remote add user-to-merge-from https://github.com/user-to-merge-from/jclouds.git
     git fetch user-to-merge-from
     }}}
+    a. Alternatively, you can configure a ''github'' remote to also fetch the pull requests, and checkout them as follows (for a complete guide refer to [[https://help.github.com/articles/checking-out-pull-requests-locally|the GitHub howto]]):
+    {{{
+    $ git remote add github git@github.com:jclouds/jclouds.git
+    $ vim .git/config
+ 
+    # Edit the 'github' remote and add the additional 'fetch' line as follows
+    [remote "github"]
+ 	url = git@github.com:jclouds/jclouds.git
+         fetch = +refs/heads/*:refs/remotes/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
+    }}}
   1. Cherry pick the commit you want to merge
-    {{{ 
+    {{{
-    git cherry-pick hash-to-merge 
+    git cherry-pick hash-to-merge
     }}}
   1. Push the commit (you'll want to setup a .netrc file to make this easy, see [[https://git-wip-us.apache.org/#contents|Committers: Getting Started]])
     {{{