git init Initiate git in an existing project.
git clone git@repository_ssh Clone a project (you do not have to create a folder).
git add . Add any new files under version control.
git commit -am 'This is a message.' Commit the changes.
git push -u origin master Push changes for the first time to repository.
git push Push changes.
git status Check the status of the project. See if there are any unstaged files, new files etc.
git reset --hard HEAD Reset local files to HEAD.
Remove last commit but keep changes:
git reset HEAD^
Restore "lost" changes after git rebase --skip
git log -g
git checkout -b recovery <SHA>
or
git log -g
git reset --hard <SHA>