49 ms·
Any very wrong merge[1] may leave the central repo in `working but contains nonsensical data' state. In SVN you can only commit a reverting changeset or you can
by dexen 16y ago
Any very wrong merge[1] may leave the central repo in `working but contains nonsensical data' state. In SVN you can only commit a reverting changeset or you can alter the state of the server. The former leaves the merge around to trip up future merges; the later requires you to have admin access to the server and may break user's checkouts.
In git, you can just push a clean branch on the server, if you take some caution. No elevated privileges needed.
Actually, most of the time it won't be necessary, because the user will simply not push a wrong merge to the server. No need to clean up.
Actually once in a while I do torch whole repo (both .git and checked out files), but that's only when I was experimenting with something and didn't like the result. Cheap local cloning of Git repos makes that experimentation fast, easy & safe.
On the other hand, if I ever have to really, positively clean the repo to a known state, `git co -f $SOME_BRANCH' or `git co -f HEAD'; end of the story. Perhaps also remove the leftover untracked files, if I was cleaning merge abandoned in progress.
--
[1] as I described here: http://news.ycombinator.com/item?id=2310065 http://news.ycombinator.com/item?id=2310065