3 parts of a Git project
How to: View status
git status
How to: Add files to staging area (multiple)
git add
or multiple: git add
How to: View changes
git diff
How to: Start a new project
git init
How to: Save changes from the staging area
git commit -m””
How to: View commit history
git log
What is the HEAD commit?
What does git show HEAD do?
The commit you are currently on
Shows the log info for the current commit and the changes that were committed
How to: View the current commit
git show HEAD
How to: Restore to last commit
git checkout HEAD
What does git checkout HEAD do?
Rolls back (unstages) file changes in the staging area to last commit but does not discard changes from the working direcory