3 ms·
> git reflog expire Is there a valid reason to do this in the first place? > git push origin -f No standard way to undo that. Only do it if you must, and you
by majewsky 9y ago
> git reflog expire
Is there a valid reason to do this in the first place?
> git push origin -f
No standard way to undo that. Only do it if you must, and you absolutely do what's going to happen. Always do a "got remote update" immediately before the force-push and double-check that the remote branch points to what you expect.
As a general rule, "--force" is short for "you better be prepared to deal with the consequences".