The Git & Github Bootcamp

The Git & Github Bootcamp

English | MP4 | AVC 1280×720 | AAC 44KHz 2ch | 17 Hours | 6.18 GB

Master the essentials and the tricky bits: rebasing, squashing, stashing, reflogs, blobs, trees, & more!

The following sentence is annoying, but also true: the best time to learn Git was yesterday. Fortunately, the second best time is today! Git is an essential tool for work in any code-related field, from data science to game development to machine learning. This course covers everything you need to know to start using Git and Github in the real-world today!

The course’s 20+ sections are broken down into four separate units:

  • Git Essentials
  • Next Level Git
  • Github & Collaboration
  • The Tricky Bits

We start off with Git Essentials. The goal of this unit is to give you all the essential Git tools you need for daily use. We start off talking about version control software, what it is, why it matters, and the history of Git. Then we install Git and run through the Unix commands you’ll need to work with Git (you can skip this if you’re already familiar). The bulk of this unit is focused on teaching the core Git mechanics like committing and branching and the associated concepts: the working directory, the repository, the staging area, etc. We cover Git commands including: git init, git add, git commit, git status, git log, git branch, and git merge. We end with a detailed look at branching, merging, and resolving conflicts.

Then we move on to out Next Level Git unit, where we cover additional commands and Git concepts that are extremely useful, but maybe not as “core” as the Git Essentials. We start with a comprehensive look at the gif diff command and the various comparisons that we can make between commits, branches, the working directory, the staging area, and more! We pay special attention to reading and parsing the dense output generated by diffs. Then we shift our focus to stashing with the git stash command, a “convenience command” that many users love incorporating into their Git workflow. Finally, we dive deep into undoing changes and time traveling with Git. We learn how to revisit earlier work, detach and re-attach HEAD, and discard changes. We cover git commands that help us undo changes including git checkout, git restore, git reset, and git revert.

Next up, we change gears to focus on Github & Collaboration. We start by exploring Github (and similar tools) that host remote repositories and discussing the benefits they provide. We create our own Github repositories and sync up changes between our remote and local repositories using the git push, git pull, and git fetch commands. We then focus on commonly used collaboration workflows that students may encounter in the real world: feature branching, pull requests, forking & cloning, and more! We discuss contributing to open source projects and configuring Github repositories for collaboration. We also spend some time learning about useful Github features including Github Gists and Github Pages for free static hosting.

The last unit in the course, The Tricky Bits, is really just a collection of useful Git command and advanced topics. We start by covering one of the “scarier” Git commands: rebasing! We discuss the potential benefits and pitfalls of rebasing and compare it to merging. Then we learn how to clean up our Git history by rewording, editing, dropping, and squashing commits using the interactive rebase command. Next, we discuss Git tags (lightweight and annotated tags) semantic versioning and tagging workflows. After that, we move on to a deep dive into the inner workings of Git. We discuss the files and folders Git uses internally, the role of hashing functions in Git, and the role of Git objects (blobs, trees, etc.). Next, we talk about reference logs and the git reflog command. Specifically, we learn how we can use reflogs to rescue “lost” commits and undo rebases. Finally, we learn how to write custom and powerful Git aliases!

Throughout the course, you’ll find tons and tons of diagrams and visual references I’ve created to try and explain Git. The course also includes exercises I’ve tested on my in-person students, to give you an opportunity to practice the concepts in the course along the way. If you are reading this sentence,

What you’ll learn

  • Understand how Git works behind the scenes
  • Explain the difference Git objects: trees, blobs, commits, and annotated tags
  • Master the essential Git workflow: adding & committing
  • Work with Git branches
  • Perform Git merges and resolve merge conflicts
  • Use Git diff to reveal changes over time
  • Master Git stashing
  • Undo changes using git restore, git revert, and git reset
  • Work with local and remote repositories
  • Master collaboration workflows: pull requests, “fork & clone”, etc.
  • Squash, clean up, and rewrite history using interactive rebase
  • Retrieve “lost” work using git reflogs
  • Write custom and powerful Git aliases
  • Mark releases and versions using Git tags
  • Host static websites using Github Pages
  • Create markdown READMEs
  • Share code and snippets using Github Gists
Table of Contents

Course Orientation
1 Welcome To The Course!
2 What The Course Covers
3 A Note On The Exercises
4 Accessing The Slides & Diagrams

Introducing…Git!
5 What Really Matters In This Section
6 What Exactly Is Git
7 Visualizing Git
8 A Quick History Of Git
9 Who Uses Git
10 Git Vs. Github What’s The Difference

Installation & Setup
11 What Really Matters In This Section
12 Installing Git Terminal Vs. GUIs
13 WINDOWS Git Installation
14 MAC Git Installation
15 Configuring Your Git Name & Email
16 Installing GitKraken (Our GUI)
17 Terminal Crash Course Introduction
18 Terminal Crash Course Navigation
19 Terminal Crash Course Creating Files & Folders
20 Terminal Crash Course Deleting Files & Folders

The Very Basics Of Git Adding & Committing
21 What Really Matters In This Section
22 What Is A Git Repo
23 Our First Commands Git Init and Git Status
24 The Mysterious .Git Folder
25 A Common Early Git Mistake
26 The Committing Workflow Overview
27 Staging Changes With Git Add
28 Finally, The Git Commit Command!
29 The Git Log Command (And More Committing)
30 Committing Exercise

Commits In Detail (And Related Topics)
31 What Really Matters In This Section
32 Navigating The Git Documentation
33 Keeping Your Commits Atomic
34 Commit Messages Present Or Past Tense
35 Escaping VIM & Configuring Git’s Default Editor
36 A Closer Look At The Git Log Command
37 Committing With A GUI
38 Fixing Mistakes With Amend
39 Ignoring Files w .gitignore

Working With Branches
40 What Really Matters In This Section
41 Introducing Branches
42 The Master Branch (Or Is It Main)
43 What On Earth Is HEAD
44 Viewing All Branches With Git Branch
45 Creating & Switching Branches
46 More Practice With Branching
47 Another Option Git Checkout Vs. Git Switch
48 Switching Branches With Unstaged Changes
49 Deleting & Renaming Branches
50 How Git Stores HEAD & Branches
51 Branching Exercise

Merging Branches, Oh Boy!
52 What Really Matters In This Section
53 An Introduction To Merging
54 Performing A Fast Forward Merge
55 Visualizing Merges
56 Generating Merge Commits
57 Oh No! Merge Conflicts!
58 Resolving Merge Conflicts
59 Using VSCode To Resolve Conflicts
60 Merging Exercise

Comparing Changes With Git Diff
61 What Really Matters In This Section
62 Introducing The Git Diff Command
63 A Guide To Reading Diffs
64 Viewing Unstaged Changes
65 Viewing Working Directory Changes
66 Viewing Staged Changes
67 Diffing Specific Files
68 Comparing Changes Across Branches
69 Comparing Changes Across Commits
70 Visualizing Diffs With GUIs
71 Diff Exercise

The Ins and Outs of Stashing
72 What Really Matters In This Section
73 Why We Need Git Stash
74 Stashing Basics Git Stash Save & Pop
75 Practicing With Git Stash
76 Git Stash Apply
77 Working With Multiple Stashes
78 Dropping & Clearing The Stash
79 Stashing Exercise

Undoing Changes & Time Traveling
80 What Really Matters In This Section
81 Checking Out Old Commits
82 Re-Attaching Our Detached HEAD!
83 Referencing Commits Relative to HEAD
84 Discarding Changes With Git Checkout
85 Un-Modifying With Git Restore
86 Un-Staging Changes With Git Restore
87 Undoing Commits With Git Reset
88 Reverting Commits With…Git Revert
89 Undoing Changes Exercise

Github The Basics
90 What Really Matters In This Section
91 What Does Github Do For Us
92 Why You Should Use Github!
93 Cloning Github Repos With Git Clone
94 Cloning Non-Github Repos
95 Github Setup SSH Config
96 Creating Our First Github Repo!
97 A Crash Course on Git Remotes
98 Introducing Git Push
99 Touring A Github Repo
100 Practice With Git Push
101 Another Github Workflow Cloning First
102 Main & Master Github Default Branches
103 Github Basics Exercise

Fetching & Pulling
104 What Really Matters In This Section
105 Remote Tracking Branches WTF Are They
106 Checking Out Remote Tracking Branches
107 Working With Remote Branches
108 Git Fetch The Basics
109 Demonstrating Git Fetch
110 Git Pull The Basics
111 Git Pull & Merge Conflicts
112 A Shorter Syntax For Git Pull

Github Grab Bag Odds & Ends
113 What Really Matters In This Section
114 Github Repo Visibility Public Vs. Private
115 Adding Github Collaborators
116 Github Collaboration Demo
117 What are READMEs
118 A Markdown Crash Course
119 Adding a README To A Project
120 Creating Github Gists
121 Introducing Github Pages
122 Github Pages Demo

Git Collaboration Workflows
123 What Really Matters In This Section
124 The Pitfalls Of A Centralized Workflow
125 Centralized Workflow Demonstration
126 The All-Important Feature Branch Workflow
127 Feature Branch Workflow Demo
128 Merging Feature Branches
129 Introducing Pull Requests
130 Making Our First Pull Request
131 Merging Pull Requests With Conflicts
132 Configuring Branch Protection Rules
133 Introducing Forking
134 Forking Demonstration
135 The Fork & Clone Workflow
136 Fork & Clone Workflow Demonstration

Rebasing The Scariest Git Command
137 What Really Matters In This Section
138 Why is Rebasing Scary Is it
139 Comparing Merging & Rebasing
140 Rebase Demo Pt 1 Setup & Merging
141 Rebasing Demo Pt 2 Actually Rebasing
142 The Golden Rule When NOT to Rebase
143 Handling Conflicts & Rebasing

Cleaning Up History With Interactive Rebase
144 What Really Matters In This Section
145 Introducing Interactive Rebase
146 Rewording Commits With Interactive Rebase
147 Fixing Up & Squashing Commits With Interactive Rebase
148 Dropping Commits With Interactive Rebase

Git Tags Marking Important Moments In History
149 What Really Matters In This Section
150 The Idea Behind Git Tags
151 A Side Note On Semantic Versioning
152 Viewing & Searching Tags
153 Comparing Tags With Git Diff
154 Creating Lightweight Tags
155 Creating Annotated Tags
156 Tagging Previous Commits
157 Replacing Tags With Force
158 Deleting Tags
159 IMPORTANT Pushing Tags

Git Behind The Scenes – Hashing & Objects
160 What Really Matters In This Section
161 Working With The Local Config File
162 Inside Git The Refs Directory
163 Inside Git The HEAD file
164 Inside Git The Objects Directory
165 A Crash Course On Hashing Functions
166 Git As A Key-Value Datastore
167 Hashing With Git Hash-Object
168 Retrieving Data With Git Cat-File
169 Deep Dive Into Git Objects Blobs
170 Deep Dive Into Git Objects Trees
171 Deep Dive Into Git Objects Commits

The Power of Reflogs – Retrieving Lost Work
172 What Really Matters In This Section
173 Introducing Reflogs
174 The Limitations of Reflogs
175 The Git Reflog Show Command
176 Passing Reflog References Around
177 Time-Based Reflog Qualifiers
178 Rescuing Lost Commits With Reflog
179 Undoing A Rebase w Reflog – It’s A Miracle!

Writing Custom Git Aliases
180 What Matters In This Section
181 The Global Git Config File
182 Writing Our First Git Alias
183 Setting Aliases From The Command Line
184 Aliases With Arguments
185 Exploring Existing Useful Aliases Online