<?xml version="1.0" encoding="UTF-8"?>
<guide>
  <body>&lt;p&gt;Pull requests are a way to poke someone and let them know you&amp;#8217;ve got some code they may want.&lt;/p&gt;
&lt;p&gt;They work great when you want to let an upstream maintainer know that you&amp;#8217;ve pushed some useful changes to your fork of their project.&lt;/p&gt;
&lt;p&gt;They also work great if you want to let a fellow developer know that you&amp;#8217;ve pushed some experimental features to an arbitrary branch.&lt;/p&gt;
&lt;h3&gt;Step One&lt;/h3&gt;
&lt;p&gt;First, navigate to your project with the changes you want someone else to pull.  In this instance, I&amp;#8217;m going to go to &lt;a href=&quot;http://github.com/defunkt/grit&quot;&gt;defunkt/grit&lt;/a&gt; and tell mojombo to pull a change.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;http://img.skitch.com/20080223-xw8wdwkg9abpjtuwu4wutwwcqm.png&quot;/&gt;&lt;/p&gt;
&lt;h3&gt;Step Two&lt;/h3&gt;
&lt;p&gt;I can type in a message if I want and select any number of recipients.  By default, I&amp;#8217;ll see everyone who has a project in my project&amp;#8217;s network.  If I want to add someone else, I can use the autocompleter and click &amp;#8216;add.&amp;#8217;&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;http://img.skitch.com/20080223-1njj3f5559un2eyt51j92t2xkf.png&quot;/&gt;&lt;/p&gt;
&lt;h3&gt;Step Three&lt;/h3&gt;
&lt;p&gt;Sent!&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;http://img.skitch.com/20080223-8jf2dc17cdtibs2jt13ptgxwts.png&quot;/&gt;&lt;/p&gt;
&lt;h3&gt;Step Four&lt;/h3&gt;
&lt;p&gt;When mojombo logs in, he&amp;#8217;ll see that there&amp;#8217;s a new message waiting for him.&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;http://img.skitch.com/20080223-rpgh5c4e1n38wc3e45cacq77ww.png&quot;/&gt;&lt;/p&gt;
&lt;h3&gt;Step Five&lt;/h3&gt;
&lt;p&gt;&lt;img src=&quot;http://img.skitch.com/20080223-p9erf1mhepf5gc7jy9kek9rgdn.png&quot;/&gt;&lt;/p&gt;
&lt;p&gt;mojombo can reply to my message, delete it, or ignore it. Pulling from me is easy. mojombo can add the defunkt repository as a remote source and fetch its contents like this:&lt;/p&gt;
&lt;pre class=&quot;console&quot;&gt;
&lt;span&gt;$&lt;/span&gt; git remote add defunkt git://github.com/defunkt/grit.git
&lt;span&gt;$&lt;/span&gt; git fetch defunkt
&lt;/pre&gt;
&lt;p&gt;The &amp;#8216;git remote add&amp;#8217; will stay in your repository configuration, so the next time you get a pull request, you only need to fetch again. Note that to fetch from a private repository, you need to use the private update &lt;span class=&quot;caps&quot;&gt;URL&lt;/span&gt;.  If grit were private for example, the remote add would look like, &amp;#8220;git@github.com:defunkt/grit.git&amp;#8221;.&lt;/p&gt;
&lt;p&gt;To merge the changes done in the defunkt repository to a local branch, e.g., the master branch, you can run&lt;/p&gt;
&lt;pre class=&quot;console&quot;&gt;
&lt;span&gt;$&lt;/span&gt; git checkout master
&lt;span&gt;$&lt;/span&gt; git merge defunkt/master
&lt;/pre&gt;
&lt;p&gt;You can also use the git-pull helper to do the fetch+merge in one step. This comes in handy for one-shot pulls where you do not want to use the same repository again in the near future:&lt;/p&gt;
&lt;pre class=&quot;console&quot;&gt;
&lt;span&gt;$&lt;/span&gt; git checkout master
&lt;span&gt;$&lt;/span&gt; git pull git://github.com/defunkt/grit.git master
&lt;/pre&gt;
&lt;p&gt;Now that you have merged defunkt/grit&amp;#8217;s master branch, you should probably push your branch to let others see the merge.&lt;/p&gt;</body>
  <created-at type="datetime">2008-02-23T01:31:04-08:00</created-at>
  <id type="integer">16</id>
  <permalink>pull-requests</permalink>
  <title>Pull Requests</title>
  <updated-at type="datetime">2009-11-15T03:39:18-08:00</updated-at>
  <user-id type="integer">153510</user-id>
</guide>
