Git branch at commit

up: Git

Create the branch using a commit hash:

git branch branch_name <commit-hash>

Or by using a symbolic reference:

git branch branch_name HEAD~3

To checkout the branch while creating it, use:

git checkout -b branch_name <commit-hash or HEAD~3>