Check out my first novel, midnight's simulacra!
Git: Difference between revisions
From dankwiki
(automatic remote branch pruning) |
|||
Line 40: | Line 40: | ||
<tt>git remote prune origin</tt> | <tt>git remote prune origin</tt> | ||
This can be made automatic with <tt>git config remote.origin.prune true</tt> since git 1.8.5. | This can be made automatic with <tt>git config remote.origin.prune true</tt> since git 1.8.5. | ||
===Hard sync to upstream=== | |||
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> | |||
then, to force your own fork to match: | |||
<tt>git push origin master --force</tt> | |||
Congratulations! You've just thrown away any local work. | |||
==Links== | ==Links== |