# gt init
When the 'gt init' command is called, gitutor runs the following commands under the hood:
$ git init
This initializes a hidden folder with the name ".git". Git stores in this folder all the information concerning commits and the different versions of your project.
Afterwards a README.md file is created and the first commit is done with:
$ git add . $ git commit -m 'First commit'
These git commands will be explained in the 'gt save' lesson.
Next, gitutor creates a new empty repository on your github account. This can be done from github's website. If the repository is created with the default README.md option, it won’t be possible to push your local repo.
Once the repo has it's first commit and the github repo is created, a remote is added with:
$ git add remote origin https://github.com/user/repo.git
A remote is an url that points to a repository on another machine (in this case on github's servers).
"Origin" refers to the name assigned to that particular remote repository, it could be a name of your choosing.
Once the remote is added, the commit is pushed with the -u flag to set this remote as the upstream:
$ git push -u
This will set your remote repository as the default place where commits should be pushed and where you’ll pull the changes from.
This commands offers an optional flags:
$ gt init -l
This flag tells gitutor to start only a local repository, so no remote repository will be created.