4 ms·
Indeed. When the article said "younger developers only know git" I immediately thought, no, they don't know anything. These people don't even know what a DAG is
by cup-of-tea 9y ago
Indeed. When the article said "younger developers only know git" I immediately thought, no, they don't know anything. These people don't even know what a DAG is. Git was made for people who know these concepts. I've tried explaining git to people and they just don't understand. They just don't.
What's annoying is that git is just expected knowledge these days and having a github account is enough to claim it. There's not a good way to sell the fact that you're a bit more into it than that.
I've even said to git "experts" that branches should really be called refs and their eyes glaze over. It's difficult for me to understand what git is in their heads.
- y4mi 9y agoWhy would you call branches ref's? They don't point to specific files or commits. I know you can target commits through them - which utilizes the ref syntax... But they're still not really referencing anything directly. They're completely arbitrary and are just a feature to improve gits workflow.
- friend-monoid 9y agoBut they are also called symbolic refs in git terminology...
- y4mi 9y agoThat term makes sense. But just as you wouldn't call a symlink to a zip archive a zip file itself, you also shouldn't call a branch a ref.
- cup-of-tea 9y agoSo would you rather say a branch is a commit?
- y4mi 9y agoA branch is a pointer or symlink if you will.
- rantanplan 9y agoBut it is a ref. It's an alias for the last commit of a particular timeline, as I said above.
- friend-monoid 9y agoHrm, but a ref is a file containing a hash, right? So if the hash is equivalent to the file, the surely a ref is equivalent to a symlink? A symbolic ref, in turn, should be a symlink to a symlink... Or something like that...
- y4mi 9y agoA ref points to an object. That object doesn't change unless the hashing algo was tricked. A branch points to anything you want it to point to. It can be any ref you want and can be changed at will.
- friend-monoid 9y agosha1 - object (e.g. 5a480efb...) file with sha1 - ref (e.g. master) file with ref - symbolic ref (e.g. HEAD) right? Seeing as you can git update-ref branches, but you need to git symbolic-ref HEAD.
- ethomson 9y agoA symbolic ref is a ref that points to another ref instead of a ref that points to a commit. `HEAD` is a symbolic ref. (It should be your only symbolic ref.)
- friend-monoid 9y agoUnless it is detached. :)
- aequitas 9y agoI started naming branches 'post-its', as to me that's what they are, labels you place on the real 'branches' (the commit tree). You can take them of easily, move them, discard them, whatever you want. They are just volatile.
- rantanplan 9y ago> They don't point to specific files or commits. A branch points to the tip(last commit) of a particular timeline.
- cup-of-tea 9y agoI should have said pointers. I didn't mean to overload existing git terminology. My point was just that they are pointers/references to some commit.
- baud147258 9y ago> It's difficult for me to understand what git is in their heads. In that case, they were thinking the git was you.