Web Dev Roadmap for Beginners (Free!): https://bit.ly/DaveGrayWebDevRoadmap

Undoing git mistakes can be difficult if you don't know how. This video steps through examples of how you can undo all types of actions in git as well as explaining git branches and merges. Full outline and timestamps below!

Outline with timestamps:
(0:04) Recap Quick Start
(1:20) git restore [filename] (undo changes)
(2:18) git restore --staged [filename] (undo staged files)
(3:09) git log (show log with details)
(3:45) git log --oneline (shows simplified log)
(4:35) git commit -v --amend (change last commit's message)
(6:35) git branch [newBranchName] (creates new branch)
(7:50) git branch --list (lists all branches)
(8:05) git checkout [branchName] (switch to this branch)
(8:10) working with more than one branch
(12:25) git branch -m [oldBranchName] [newBranchName] (renames branch)
(14:10) git checkout -b [newBranchName] (creates new branch and switches to it)
(15:00) git branch -D [branchName] (deletes branch permanently)
(16:00) git merge [branchName] (merges named branch into branch you are on)
(17:10) Understanding and handling git merge conflicts
(22:30) git checkout [commitNumber] (go back to a specific commit number)
(27:00) git revert [commitNumber] (revert code to a specific commit number by creating new commit)
(29:30) git reset [commitNumber] (reset code to a specific commit number and unstage the code that came after that commit)
(31:45) git reset [commitNumber] --hard (reset code to a specific commit and permanently delete the code that came after the commit)

More Beginner Dev Videos:
freeCodeCamp: https://youtu.be/PkZNo7MFNFg
Traversy Media: https://youtu.be/hdI2bqOjy3c
The Net Ninja: https://youtu.be/iWOYAxlnaww

Follow Me:
Twitter: https://twitter.com/yesdavidgray
Reddit: https://www.reddit.com/user/DaveOnEleven
Medium: https://medium.com/@davegray_86804

#git #commit #tutorial