Overview
Syllabus
Recap Quick Start
git restore [filename] undo changes
git restore --staged [filename] undo staged files
git log show log with details
git log --oneline shows simplified log
git commit -v --amend change last commit's message
git branch [newBranchName] creates new branch
git branch --list lists all branches
git checkout [branchName] switch to this branch
working with more than one branch
git branch -m [oldBranchName] [newBranchName] renames branch
git checkout -b [newBranchName] creates new branch and switches to it
git branch -D [branchName] deletes branch permanently
git merge [branchName] merges named branch into branch you are on
Understanding and handling git merge conflicts
git checkout [commitNumber] go back to a specific commit number
git revert [commitNumber] revert code to a specific commit number by creating new commit
git reset [commitNumber] reset code to a specific commit number and unstage the code that came after that commit
git reset [commitNumber] --hard reset code to a specific commit and permanently delete the code that came after the commit
Taught by
Dave Gray