Softball Solution¶
cd ~/Desktop
mkdir softball
cd softball
git init --initial-branch=booger
Explanation¶
-
cd
(change directory) into~/Desktop/
cd ~/Desktop
-
mkdir
(make directory)softball/
.cd ~/Desktop mkdir softball
-
cd
intosoftball/
, since that's where we want the git repo to live.cd ~/Desktop mkdir softball cd softball
-
Initialize the git repo with
git init
.cd ~/Desktop mkdir softball cd softball git init --initial-branch=booger
The
--initial-branch
flag lets us name the initial branch name something other thanmain
(the default name).
How do I change the initial branch name after creating it?
You can rename the current branch using git branch -m <newname>
. So,
git init --initial-branch=booger
could also be accomplished by
git init
git branch -m booger
git help
You can use
git <command> -h
to see how to use a git command orgit help <command>
to read the full docs regarding the command.