Undo your Git mistakes
Git and GitHub Basics. A beginner's handbook: commits, branches, merging, conflicts, undoing mistakes and pull requests.
20 lessons · 51 min of video · 17 quiz questions
Try a question from this course
You ran git reset HEAD~1 with no flag. What state are your changes in?
What you'll be able to do
- Explain where your code lives and use add, commit, push and pull
- Create, switch to, merge and delete branches
- Resolve a merge conflict
- Choose the right way to undo a mistake and recover lost work
- Open a pull request, including from a fork
What's in it
Starting out
Where your code lives, and how to get a copy of a project.
Branches
Work on a copy so the working version is never at risk.
Merging and conflicts
Bring branches together, and fix it when Git cannot decide.
Undoing mistakes
Which undo to reach for, and how to get back work you thought was lost.
GitHub: pushing, pull requests and forks
Share branches, ask for changes to be merged, and contribute to projects you don't own.
Made from these videos
- How Git Works: Explained in 4 Minutes · ByteByteGo
- How To Use GitHub For Beginners · corbin
- Git & GitHub Tutorial for Beginners #8 - Branches · Net Ninja
- Git & GitHub Tutorial for Beginners #9 - Merging Branches (& conflicts) · Net Ninja
- Merge Conflicts Made Easy – Git Tutorial for Beginners · Robotogeddon
- Undo ANYTHING in Git (Reset, Revert, Reflog — No Panic) · Generalist Programmer
- Undo a git commit - git reset/revert - pushed/not pushed · Philomatics
- Git + GitHub Branches, Forks, and Pull Requests · Caleb Curry























