Section A.3 Initializing a Git Repository
To begin a new repository, create a directory where you want your files to live. We have been using
~/books/ppw
in our examples. Then make that the default directory in a command-line session.rob@lava:~/books/ppw$ git init
Initialized empty Git repository in /home/rob/books/ppw/.git/
Naturally, there will be no commits in your repository.
rob@lava:~/books/ppw$ git show-branch
No revs to be shown.
But once you do make a commit, there will be a
master
branch and the root commit will get special identification as such. That’s it, you are ready to go.