I have these for merging a PR into develop and master respectively. Usage is `git pr &lt;#&gt;`<p><pre><code>  pr  = &quot;!f() { git checkout develop &amp;&amp; git fetch -fu ${2:-origin} refs&#x2F;pull&#x2F;$1&#x2F;head:pr&#x2F;$1 &amp;&amp; git checkout pr&#x2F;$1 &amp;&amp; git rebase -i origin&#x2F;develop &amp;&amp; git checkout develop &amp;&amp; git merge - &amp;&amp; git push; }; f&quot;
  prm  = &quot;!f() { git checkout master &amp;&amp; git fetch -fu ${2:-origin} refs&#x2F;pull&#x2F;$1&#x2F;head:pr&#x2F;$1 &amp;&amp; git checkout pr&#x2F;$1 &amp;&amp; git rebase -i origin&#x2F;master &amp;&amp; git checkout master &amp;&amp; git merge - &amp;&amp; git push; }; f&quot;</code></pre>