4 ms·
Once files are added to git it is almost impossible to destroy them irrecoverably. So my impression of git is the opposite I perform any command without fear to
by d0mine 17y ago
Once files are added to git it is almost impossible to destroy them irrecoverably. So my impression of git is the opposite I perform any command without fear to lose anything. If the command doesn't do what I need I just rollback to the last known good state.
- pyre 17y ago'git gc' ? ;-)
- kuahyeow 17y agohttp://www.kernel.org/pub/software/scm/git/docs/git-gc.html http://www.kernel.org/pub/software/scm/git/docs/git-gc.html "git gc tries very hard to be safe about the garbage it collects. In particular, it will keep not only objects referenced by your current set of branches and tags, but also objects referenced by the index, remote tracking branches, refs saved by git filter-branch in refs/original/, or reflogs (which may reference commits in branches that were later amended or rewound)."
- pyre 17y agoIf you have an object that's no longer referenced by anything you can lose it when you garbage collect, which was my point. I was only being half-serious, which is what the wink was meant to convey.