This chapter introduces the course, emphasizing a hands-on approach to Git learning and providing an overview of the course.
2.
Introduction to Git
5 Lessons
This chapter introduces source control, its evolution to Git, and highlights Git's distributed nature, ease of branching, and flexibility in managing code.
This chapter covers Git basics, including repository management, viewing history, checking status, adding and committing files, and a skills challenge.
4.
Clone a Repository
5 Lessons
This chapter focuses on cloning repositories, managing errors, recovering lost data, and emphasizes hands-on practice with Git commands.
This chapter emphasizes the significance of Git branching for parallel development, covering branch creation, handling detached HEADs, and effective tag usage.
This chapter covers merging in Git, including a toy merging example, step-by-step instructions, handling merge conflicts, and a merging challenge for practice.
Introduction: MergingA Toy Merging ExampleMerging Step by StepHandling Merge ConflictsChallenge: MergingAssessment #1 - Git Core
Assessment
This chapter introduces Git Stash for saving uncommitted changes, covering how to stash changes, pop them, manage multiple stashes, and a practical challenge.
Introduction: Git StashDealing With a ScenarioChoosing Your StashChallenge: Git Stash8.
Git Add Interactive
2 Lessons
This chapter covers Git's interactive staging, including adding changes selectively, splitting hunks, and distinguishing between staging and committing.
Introduction: Git Add InteractiveThe Add Interactive CommandThis chapter introduces Reflog, which tracks all actions in a repository, and shows how to use it to recover removed commits and restore the repository’s state.
Introduction: ReflogLose a Commit, Get it BackChallenge: ReflogThis chapter introduces cherry-picking in Git for selectively transferring commits between branches, covering its use and potential failures through examples.
Introduction: Cherry-PickingA Simple Cherry-PickWhen Cherry-Picking Might FailChallenge: Cherry-PickingThis chapter introduces Git rebase, explains how it simplifies repository history, and demonstrates rebasing and fast-forwarding with an example.
Introduction: Git RebaseOutline of a Simple RebaseWalkthrough of a Simple RebaseThis chapter introduces Git bisect, showing how it finds bugs via binary search of commits, using a Git bisect session demonstrating the process.
Introduction: Git BisectBisecting: The Session at a High LevelA Real 'git bisect' SessionThe Difference Between ∼ and ^Assessment #2 - Advanced Local Git
Assessment
13.
Fetching and Pulling Content
3 Lessons
This chapter explains interactions between Git repositories, covering ‘git fetch’ and ‘git pull’ commands, focusing on their distinct roles in the workflow.
Introduction: Fetching and Pulling ContentTwo Git Repos: 'git_origin' and 'git_cloned'The 'git fetch' Command14.
Working With Multiple Repositories
3 Lessons
This chapter teaches the management of multiple Git repositories, demonstrating via an example how to synchronize changes between remote linked repositories.
Introduction: Working With Multiple RepositoriesThree-Linked RepositoriesChallenge: Working With Multiple RepositoriesThis chapter covers creating and pushing branches, handling repos with different content, remote-only branches, and tracking branches with different names.
Introduction: Pushing CodeCreating and Pushing BranchesPushing to Repositories With Different ContentThe Branch Exists Only On The RemoteTracking Remote Branches With Different NamesThis chapter introduces Git submodules for linking repos, covering the 'git submodule' command, tracking submodule states, and cloning projects with submodules.
Introduction: Git SubmodulesA Worked ExampleThe 'git submodule' CommandGit Tracks the Submodule’s StateCloning a Project With SubmodulesThis chapter covers pull requests for code review and merging, demonstrating forking, branching, making changes, and raising pull requests on GitHub.
What Are Pull Requests?Forking And Branching in GitHubAssessment #3 - Remote Repository Management
Assessment
This chapter covers Git log flags for viewing commit histories in simplified, graphical, and customized formats, with a messy repository as an example.
Introduction: Git LogA Realistic Log HistoryThe 'git log' Command19.
Squashing Commits
3 Lessons
This chapter introduces squashing commits to consolidate history, with a worked example that uses 'git rebase -i' to squash a set of commits effectively.
Introduction: Squashing CommitsA Worked ExampleThe 'git rebase -i' Command20.
Bare Repositories
4 Lessons
This chapter covers bare repositories for centralizing Git workflows, demonstrates a multi-user setup, and highlights issues with force-pushing and squashing.
Introduction: Bare RepositoriesSetting up a Bare RepositorySquashes the CommitsGit Pull and Merge Hell21.
Cherry-Picking and Three-Way Merges
3 Lessons
This chapter explores how cherry-picking can fail when conflicts arise, explains three-way merges, and demonstrates using patches for precise changes.
Introduction: Cherry-Picking and Three-Way MergesAttempting to Apply Cherry-PickGenerate and Apply PatchThis chapter introduces Git hooks to control repository actions, covers pre-commit and pre-receive hooks, and provides examples and practical tips.
Introduction: Git HooksA ‘pre-commit’ HookA More Sophisticated ExampleAdditional Information on HooksAssessment #4 - Advanced Git
Assessment
This chapter concludes the course by summarizing its objectives and highlighting the knowledge gained about Git.
What You Have Learned