Free course

Git Course

Learn version control from the command line: repositories, commits, branches, merges, remotes, GitHub, and safe ways to recover from mistakes.

5 modules · 42 lessons · No signup

Prerequisites: Shell Commands

~~~

Your progress

of lessons completed.

Course completed.

What you'll learn

Track a project with Git, develop work on a branch, share it through GitHub, and undo common mistakes without losing work.

Take this course offline

Subscribe to my newsletter to get every free book, downloadable course, and complete software download.

Get the downloads

Course contents

  1. Git fundamentals

    Version control, repositories, snapshots, and configuration.

    1. Why version control
    2. What Git is
    3. Install Git
    4. Configure your Git identity
    5. Initialize a repository
    6. Working tree, staging area, and repository
    7. Check your understanding: Git fundamentals
  2. Your daily Git workflow

    Status, staging, commits, diffs, history, and ignored files.

    1. Check the repository status
    2. Stage changes
    3. Create a commit
    4. Write useful commit messages
    5. Inspect differences
    6. Read the project history
    7. Ignore generated and private files
    8. Practice with a small repository
  3. Branches and merges

    Create branches, combine work, and resolve conflicts.

    1. What a branch is
    2. Create and switch branches
    3. Merge a branch
    4. Fast-forward and merge commits
    5. Resolve a merge conflict
    6. Git, detached HEAD
    7. Delete a finished branch
    8. Check your understanding: branches and merges
  4. Undoing and recovery

    Unstage, restore, amend, revert, and recover safely.

    1. Unstage a file
    2. Discard working changes carefully
    3. Git, what if you forgot to add a file to a commit?
    4. Amend the last local commit
    5. Revert a shared commit
    6. Understand reset before using it
    7. git reflog: how to recover lost commits
    8. I posted my password / API key on GitHub
    9. Check your understanding: undoing things
  5. Remotes and GitHub

    Clone, fetch, pull, push, forks, and pull requests.

    1. What a remote is
    2. Clone a repository
    3. How to add a Git remote
    4. Fetch and pull changes
    5. Push a branch
    6. Authenticate with SSH
    7. A developer's introduction to GitHub
    8. Forks and pull requests
    9. Publish a small project
    10. Check your understanding: remotes and GitHub