git init repo

Shell
git init
git add somefile
git commit -m "initial commit"
git remote add origin https://github.com/username/new_repo
git push -u origin master $ cd /path/to/my/codebase
$ git init      (1)
$ git add .     (2)
$ git commit    (3)# New local repository
git init
git add .
git commit -m "Initial commit"

# New remote repository
git remote add origin [email protected]:username/new_repo #ssh
# Now push
git push -u origin mastercd /path/to/my/codebase
git init   
git add .    
git commit -m "my comment" 
Source

Also in Shell: