If you hadn't made any commit yet, only (1: branch) and (3: checkout) would be enough.
Or, in one command: git checkout -b newBranch
.
As mentioned in the [git reset
man page][1]:
1. $ git branch topic/wip
2. $ git reset --soft HEAD~3
(or --hard to remove unindexed files)
2. $ git checkout topic/wip