git init
will create an empty git repo- Git does not store multiple versions of the code
- Initial commit will create the master branch
- Shows the git commit history
- HEAD will follow the latest commit
git checkout <commitId>
- Can't add/commit after checked out. Commit does not match branch
git master
git checkout master
git reset --hard <commitID>
git checkout -- <filename>
git branch
git checkout -b <branch_name>
- Sets HEAD against new branch and master
- Change back to master branch first
git merge <branch_name>
git branch -D <branch_name>