4 ms·
Well, if you're already force-pushed it once, you might as well force-push the right commit (from reflog, if necessary) back to it again.
by Arnavion 6y ago
Well, if you're already force-pushed it once, you might as well force-push the right commit (from reflog, if necessary) back to it again.
- margaretdouglas 6y agoOnly works if you've recently fetched origin, otherwise it'll be a challenge sorting out what the previous HEAD was.
- sio8ohPi 6y ago--force-with-lease is almost always the flag you ought to use instead. "--force-with-lease alone, without specifying the details, will protect all remote refs that are going to be updated by requiring their current value to be the same as the remote-tracking branch we have for them."