[Freemint-list] Where is my commit?
Markus Fröschle
mfro at mubf.de
Sat Jan 28 22:10:04 MSK 2017
Am 28.01.2017 um 19:41 schrieb Vincent Rivière:
> Warning! "push -f" is a dangerous option, as it rewrites the history on
> GitHub. If misused, it can lead to data loss. Especially, deleting other
> people's work! But as far as you are alone on your branch, risks are limited.
>
You should definitely try to avoid that. Better forget this option
exists at all, IMHO.
If somebody checked out your branch and worked on it (unlikely, but not
impossible), his work may be lost. If you need to do it (and rewriting a
typo is not justifying that in my opinion, you might as well push
another version of the same thing again which corrects/reverts the
error), at least do a git push --force-with-lease instead.
--force-with-lease checks if there are in-between pushes and refuses to
execute a harmful push. At least that's what I understand from the
manuals. A pretty good insurance against team disputes ...
More information about the Freemint-list
mailing list