<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Working with Contributors</title><link>https://forge-allura.apache.org/p/allura/wiki/Working%2520with%2520Contributors/</link><description>Recent changes to Working with Contributors</description><atom:link href="http://forge-allura.apache.org/p/allura/wiki/Working%20with%20Contributors/feed" rel="self"/><language>en</language><lastBuildDate>Fri, 13 Sep 2013 15:45:28 -0000</lastBuildDate><atom:link href="http://forge-allura.apache.org/p/allura/wiki/Working%20with%20Contributors/feed" rel="self" type="application/rss+xml"/><item><title>Working with Contributors modified by Dave Brondsema</title><link>https://forge-allura.apache.org/p/allura/wiki/Working%2520with%2520Contributors/</link><description>&lt;div class="markdown_content"&gt;&lt;h1 id="working-with-contributors"&gt;Working with Contributors&lt;/h1&gt;
&lt;h2 id="pull-requests"&gt;Pull Requests&lt;/h2&gt;
&lt;p&gt;When a contributor forks Allura, commits to their fork, and then sends you a pull request (whether formal or not), you will probably want to work with their commits in your local work tree.  To do this, the easy path is to add a temporary remote.  For example, let's say Jamey Owens has forked allura and has some commits on his dev.  From your local repo you would&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;git remote add jo git://git.code.sf.net/u/jowens81/alluraj
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;&lt;code&gt;jo&lt;/code&gt; is the name of the remote, and the path to fetch is from the clone command on Jamey's fork page.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;git fetch jo
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Now you can look at Jamey's code by examining &lt;code&gt;jo/dev&lt;/code&gt;.  Check it out directly to a detached head, or make a local branch:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;git checkout -b jo/dev jo/dev
&lt;span class="c"&gt;# or perhaps for John Hoffmann if he intended to work on sandbox&lt;/span&gt;
git checkout -b jwh/jo/dev jo/dev
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;That command checks out a local branch &lt;code&gt;refs/heads/jo/dev&lt;/code&gt; tracking the remote branch &lt;code&gt;refs/remotes/jo/dev&lt;/code&gt;.  Because we have constraints on origin for what branches you can push, delete, or rebase, you'll want to either name the branch as in the alternative above, or else push to a workable name at origin, e.g., for Dave Brondsema:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;git push origin jo/dev:db/jo/dev
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;When the code passes review and testing, you merge to &lt;code&gt;dev&lt;/code&gt; as usual and then delete the remote:&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;git remote rm jo
&lt;/pre&gt;&lt;/div&gt;
&lt;h2 id="patches-by-mail"&gt;Patches by Mail&lt;/h2&gt;
&lt;p&gt;Commits exported via &lt;code&gt;git format-patch&lt;/code&gt; can be sent through email.  Save the patches to a file or files and apply them with&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;git am the-patch-file
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;This is the preferred way to get patches by email as they contain full commits with authorship, sign-off, and commit messages retained.  Patches generated with &lt;code&gt;git diff&lt;/code&gt; contain none of this and won't make a commit object when applied with &lt;code&gt;git apply&lt;/code&gt;.&lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dave Brondsema</dc:creator><pubDate>Fri, 13 Sep 2013 15:45:28 -0000</pubDate><guid>https://forge-allura.apache.org62aee6755efa2b42c8e15589d82600ab6c4b6ac2</guid></item></channel></rss>