Tech Tip: Nullifying/Resetting/Overriding a Remote Git Repository's Branch History |
[Jul. 16th, 2016|07:46 pm]
Shlomif's Technical Posts Community
|
If you have a branch in a remote repository of the
Git
version control system which you need to reset/nullify/override its
history, you can do it by setting up a brand new branch with the same name (say
starting in an empty repository) and then pushing it from there to the remote
while specifying the --force flag. Thanks to the people
from #git on Freenode for enlightening me.
Licence
Copyright by Shlomi Fish, 2016.
You can reuse this entry under
the Creative Commons
Attribution 3.0 Unported licence, or at your option any later version of
it.
See the
instructions
on how to comply with it.
|
|