1. git init

create an empty repos. Now we don't have master branch yet.


2. git add dirName

add all the files for staged


3. git commit -m "the first commit"

now we have the master branch


4. git checkout -b <branchName>

create  a new branch and switch from the master to the new branch