3 ms·
It's best to think of Git not as a version control framework but as a library of functions on a directory-tree data structure (edit: with a history). With this
by cynicalkane 15y ago
It's best to think of Git not as a version control framework but as a library of functions on a directory-tree data structure (edit: with a history). With this mental model, you realize that
1) there's all kinds of crazy things you can do
2) for a given crazy thing someone's probably already done it, and if it's not too far-out there's probably a command for it.
The reflog makes uncollected garbage available to the user, meaning that if you screw up you can just roll back to an old commit, carrying with it an entire history, even if that commit is no longer referenced by the repo.
- jcheng 15y ago> on a directory-tree data structure Or on a directed acyclic graph of refs; that's the definition that made everything click for me.
- xpaulbettsx 15y agoThe key that makes things click for me is, the Commit is the most important 'unit' of Git. Tags, branches, pseudo-refs like HEAD are all just mutable or immutable (like tags) pointers to commits. http://tom.preston-werner.com/2009/05/19/the-git-parable.html http://tom.preston-werner.com/2009/05/19/the-git-parable.htm... is absolutely worth your time if the above statement didn't trigger a lightbulb in your head
- gwern 15y agoWhat is this, a discussion of Haskell monad tutorials? :)
- mattmanser 15y agoSeriously? It's a VCS and that's all it is. Your comment doesn't address the parent's comment at all. Moving VCS is hard in any team with more than a few members, especially when the change is coming from a few and not everyone. I remember my old company moving from MS VSS to svn, all we hear was 'why, VSS works!', even though it was a nightmare compared to svn. Of course the change had a bunch of teething problems and the conservatives pointed and moaned more. But who in their right mind would say VSS is better than SVN? Any organisational change is hard, no matter how 'obviously' better it is.