How to setup a git repository
Configure Git for the first time
git config --global user.name "name"`
git config --global user.email "email"
Clone the existing repository
git clone <git-url>
If your code is ready to push
cd existing project
git init
git add --all
git commit -m "Initial Commit"
git remote add origin https://username@github.com/reponame.git
git push -u origin master
If your code is already tracked by Git
cd existing-project
git remote set -url https://username@github.com/reponame.git
git puhs -u origin master