git initgit add .Prior to the first commit, you mus set your account's default identity (omit --global to set the identity only in this repository.):
git config --global user.email "you@example.com"git config --global user.name "Your Name"git commit -m "first commit"git remote add origin https://github.com/mygitaccount/myrepository.gitgit push -u origin masterInput your Github credentials
$ git add foo$ git commit -m "changed foo file"$ git push -u origin masterNote 1: If you don't remember which files you have edited or added, you can git commit -m "any name" in order to see the edited files under "changes not staged for commit" and the new created files under "Untracked files". Then you can git add the files, then git commit and then git push.