/raw/501243ea466193f664fac3097323f58c/
501243ea466193f664fac3097323f58c
text
Text only
5
2025-04-03T18:53:52
True
False
False
/api/public/snipt/113/
force-push-branch
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a>
<a href="#L-2">2</a>
<a href="#L-3">3</a>
<a href="#L-4">4</a>
<a href="#L-5">5</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>git push -f <remote> <branch>
</span><span id="L-2"><a name="L-2"></a>
</span><span id="L-3"><a name="L-3"></a>e.g. git push -f origin master <-- Don't use master
</span><span id="L-4"><a name="L-4"></a>
</span><span id="L-5"><a name="L-5"></a>Leaving off <remote> and <branch> will force push all local branches that have set --set-upstream.
</span></pre></div>
</td></tr></table>