Git init
We want to get started our first git version control repo. It’s as simply as calling git init
in the working directory.
Then we can use git status
at any moment to check the current tracking status. Usually, we would like to commit the files as initial commit.
Time for Action—Init first git repo
-
cd
into your working project. -
Type
git init
to get started.$ git init
-
Check status:
$ git status
-
Add all files in current directory:
$ git add .
-
Commit the changes with message.
$ git commit -m "Init code with index.html"
Exercise
In the following sandbox environment, try to commit the first file into the git repo.