If I have an n
number of commits, how can I create a branch from the n-3
commit?
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>