3 ms·
Somewhat pedantic but relevant. A branch is a single commit. There aren't different commits _in_ a branch to checkout. Regardless, if you are asking whether yo
by SpaceNugget 3y ago
Somewhat pedantic but relevant. A branch is a single commit. There aren't different commits _in_ a branch to checkout.
Regardless, if you are asking whether you can check out commit that doesn't have a branch pointing at it, yes you can.
You can have a work tree for every commit in your repository if you like.
- glandium 3y agoYou can have multiple work trees for the same commit, for that matter, as long as they are the same branch (so with different branches pointing at the same commit, or detached heads)
- gpderetta 3y agoto be even more pedantic, a branch is a (named) pointer to a commit. You can have multiple names pointing to that commit.