Here are mine, helpful colors and error message included.<p><pre><code>  sync = &quot;!f() { echo \&quot;$(tput setaf 4)Syncing this branch with origin master$(tput sgr 0)\&quot; &amp;&amp; git fetch origin master &amp;&amp; git rebase origin&#x2F;master &amp;&amp; echo \&quot;$(tput setaf 2)Branch sync successful$(tput sgr 0)\&quot;; }; f&quot;

  ship = &quot;!f() { echo \&quot;$(tput setaf 4)Shipping this branch to master$(tput sgr 0)\&quot; &amp;&amp; git checkout master &amp;&amp; (git merge --ff-only - || (echo \&quot;$(tput setaf 1)Could not merge branch into local master\\nRun git sync before running this command\\nIf this error persists, you have local, un-pushed commits in your master branch\\nPush them to origin master or move them into a branch before running this command$(tput sgr 0)\&quot;; git checkout -; return 1)) &amp;&amp; (git push origin master || (echo \&quot;$(tput setaf 1)Could not push branch\\nRun git sync before running this command$(tput sgr 0)\&quot;; git reset --hard HEAD@{1}; git checkout -; return 1)) &amp;&amp; echo \&quot;$(tput setaf 2)Branch ship successful$(tput sgr 0)\&quot;; }; f&quot;
</code></pre>
The reason they are separate is so that you can<p><pre><code>  git push --force-with-lease origin HEAD:&lt;remote-branch-name&gt;
</code></pre>
in between. This way, GitHub marks the PR as &quot;Merged&quot; instead of &quot;Closed with unmerged commits&quot;. It&#x27;s a minor detail, but I like it.