3 ms·
> `git checkout branchname` does nothing except make HEAD point to the commit You probably know this, but since we are being pedantic we might as well get it r
by xorcist 3y ago
> `git checkout branchname` does nothing except make HEAD point to the commit
You probably know this, but since we are being pedantic we might as well get it right: That describes "git reset". "git checkout" does that and record that we are tracking branchname. So any commits will move both HEAD and the branchname reference.
- Izkata 3y agoWell along those same lines, making a commit doesn't move HEAD, it's still pointing at the same branchname as before. cat .git/HEAD