Check out my first novel, midnight's simulacra!

Git: Difference between revisions

From dankwiki
Line 42: Line 42:
===Hard sync to upstream===
===Hard sync to upstream===
Warning: this will throw away even committed local changes! Assuming remote <tt>upstream</tt> and branch <tt>master</tt>:
Warning: this will throw away even committed local changes! Assuming remote <tt>upstream</tt> and branch <tt>master</tt>:
<tt>git reset --hard upstream/master</tt>
<tt>git reset --hard upstream/master</tt>
then, to force your own fork to match:
then, to force your own fork to match:
<tt>git push origin master --force</tt>
<tt>git push origin master --force</tt>
Congratulations! You've just thrown away any local work.
Congratulations! You've just thrown away any local work.