Initialize git repository

Open the terminal at the base directory and type:
git init
git remote add origin
git add .
git commit -am "initial"
git push origin master
If your repository is not empty, first pull changes or your push will be rejected. Run this before pushing:
git pull origin master