4 ms·
It still is a broken design that you can ever lose history or hose a repository in a tool that is designed to store history, forever. That's a sharp edge that
by pifflesnort 14y ago
It still is a broken design that you can ever lose history or hose a repository in a tool that is designed to store history, forever.
That's a sharp edge that should be exposed, and its not the only one in git.
- stormbrew 14y agoTo be fair, I don't think even in the scenario in question the history is truly lost. It'll still be in the reflog at least.
- cjh_ 14y agoMistakes like this happen often, being able to purposefully delete history (at least as far as the remote is concerned) is a very important feature of a VCS.
- jrdn 14y agoI really, really want to be able to lose some history sometimes. Like if someone checks in sensitive user data by accident. Rolling it back is insufficient, I want that expunged. Maybe git doesn't do it perfectly, but it has reason to do it.
- lennartregebro 14y agoSure, that's OK. But shouldn't that command be explicit?
- cjh_ 14y agoMost of the time the information is not lost, and if you act quickly, it often just takes some git-reflog-foo to wrestle it out (or possibly as simple as looking at ORIG_HEAD, depending on how you 'lost' it). History not referenced will eventually be reaped by the garbage collector though.
- knowtheory 14y agoYou are making a mistake regarding how you think about git. Git is not really a revision tracking system. Git is a content tracking file system manager. It happens to be the case that these two uses largely overlap, but what Git really lets you do is take snapshots of your filesystem, annotate each snap shot, and allow you to compare snapshots. It does not keep track of your changes. You keep track of your changes when you use git by annotating each snapshot.
- lennartregebro 14y agoYou are of course correct. However on Gits' homepage: "Git is a free and open source distributed version control system".
- jrockway 14y agoWait until you see what happens when you type "rm -rf .git". Oh noes, the rm tool lets me DELETE HISTORY!