Learn Git the Hard Way

This course on the version control system Git draws on decades of experience to help developers learn about Git and achieve successful collaborations.

Beginner

86 Lessons

2h 30min

Certificate of Completion

This course on the version control system Git draws on decades of experience to help developers learn about Git and achieve successful collaborations.

AI-POWERED

Explanations

AI-POWERED

Explanations

This course includes

4 Assessments
132 Playgrounds

This course includes

4 Assessments
132 Playgrounds

Course Overview

Git is one of the most widely used version control tools, and is something that every developer should become comfortable with. In this course, you will get hands-on experience working with Git so that when it comes time to use it, you’ll be ready. You’ll start by learning some of the more fundamental concepts such as initializing a Git repository, adding files to a repository, and how to commit changes. You’ll also learn how to clone a repository, and how to create branching. You’ll then make your way to...Show More

TAKEAWAY SKILLS

Devops

Git

Version Control

Course Content

1.

Introduction

This chapter introduces the course, emphasizing a hands-on approach to Git learning and providing an overview of the course.
2.

Introduction to Git

This chapter introduces source control, its evolution to Git, and highlights Git's distributed nature, ease of branching, and flexibility in managing code.
3.

Git Basics

This chapter covers Git basics, including repository management, viewing history, checking status, adding and committing files, and a skills challenge.
4.

Clone a Repository

This chapter focuses on cloning repositories, managing errors, recovering lost data, and emphasizes hands-on practice with Git commands.
5.

Git Branching

This chapter emphasizes the significance of Git branching for parallel development, covering branch creation, handling detached HEADs, and effective tag usage.
6.

Merging

5 Lessons

This chapter covers merging in Git, including a toy merging example, step-by-step instructions, handling merge conflicts, and a merging challenge for practice.

Assessment #1 - Git Core

Assessment

7.

Git Stash

4 Lessons

This chapter introduces Git Stash for saving uncommitted changes, covering how to stash changes, pop them, manage multiple stashes, and a practical challenge.
8.

Git Add Interactive

2 Lessons

This chapter covers Git's interactive staging, including adding changes selectively, splitting hunks, and distinguishing between staging and committing.
9.

Reflog

3 Lessons

This 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.
10.

Cherry Picking

4 Lessons

This chapter introduces cherry-picking in Git for selectively transferring commits between branches, covering its use and potential failures through examples.
11.

Git Rebase

3 Lessons

This chapter introduces Git rebase, explains how it simplifies repository history, and demonstrates rebasing and fast-forwarding with an example.
12.

Git Bisect

4 Lessons

This chapter introduces Git bisect, showing how it finds bugs via binary search of commits, using a Git bisect session demonstrating the process.

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.
14.

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.
15.

Pushing Code

5 Lessons

This chapter covers creating and pushing branches, handling repos with different content, remote-only branches, and tracking branches with different names.
16.

Git Submodules

5 Lessons

This chapter introduces Git submodules for linking repos, covering the 'git submodule' command, tracking submodule states, and cloning projects with submodules.
17.

Pull Requests

2 Lessons

This chapter covers pull requests for code review and merging, demonstrating forking, branching, making changes, and raising pull requests on GitHub.

Assessment #3 - Remote Repository Management

Assessment

18.

Git Log

3 Lessons

This chapter covers Git log flags for viewing commit histories in simplified, graphical, and customized formats, with a messy repository as an example.
19.

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.
20.

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.
21.

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.
22.

Git Hooks

4 Lessons

This chapter introduces Git hooks to control repository actions, covers pre-commit and pre-receive hooks, and provides examples and practical tips.

Assessment #4 - Advanced Git

Assessment

23.

Finished

1 Lesson

This chapter concludes the course by summarizing its objectives and highlighting the knowledge gained about Git.

Course Author

Trusted by 1.4 million developers working at companies

Anthony Walker

@_webarchitect_

Emma Bostian 🐞

@EmmaBostian

Evan Dunbar

ML Engineer

Carlos Matias La Borde

Software Developer

Souvik Kundu

Front-end Developer

Vinay Krishnaiah

Software Developer

Eric Downs

Musician/Entrepeneur

Kenan Eyvazov

DevOps Engineer

Anthony Walker

@_webarchitect_

Emma Bostian 🐞

@EmmaBostian

Hands-on Learning Powered by AI

See how Educative uses AI to make your learning more immersive than ever before.

Instant Code Feedback

Evaluate and debug your code with the click of a button. Get real-time feedback on test cases, including time and space complexity of your solutions.

AI-Powered Mock Interviews

Adaptive Learning

Explain with AI

AI Code Mentor

FOR TEAMS

Interested in this course for your business or team?

Unlock this course (and 1,000+ more) for your entire org with DevPath