Basic Git Commands

git push

Applies local commits to a remote repository.

git checkout

Restores modified files in the working tree to the versions in the index.

git checkout [file]

Restores modified files in the working tree to the versions in HEAD.

git checkout HEAD (file name: optional) 

Restores modified files in the working tree to the versions in FETCH_HEAD.

git checkout FETCH_HEAD (file name: optional) 

git commit

Registers the changes currently in the index area into the commit area.

git commit -m "comment"

Registers all changes that have not been added to the index into the commit area as well.

git commit -a -m "comment"