Initializing Git For Version Control


Setting up Git for the first time on a new project is fairly simple, you just need to enter these five commands into your terminal. Be sure to be sitting in the directory where your project is located!

You only need to do this once, right when you start your new project. If you create a completely new project, you’ll have to go through these commands again. But only once per project…


 



$ git config --global user.name "Your Name"
$ git config --global user.email "[email protected]"
$ git config --global push.default matching
$ git config --global alias.co checkout
$ git init

 
 
** Be sure to change the “Your Name” and “[email protected]” in the first two commands to your actual name and your actual email address. I suggest you use the same email address that you plan to use at github.com later.