Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

Treehouse

Git Branches and Merging Course (How To)

via Treehouse

Overview

This course introduces the concept of branches in Git and shows practical uses for managing both local development and collaborative workflows.

What you'll learn

  • How Git branches work
  • Creating new branches
  • Merging branches
  • Pull Requests on GitHub

Syllabus

Branches

Git branches are like alternate timelines for your code. They let you work on several different features or bug fixes at once, without the sets of changes interfering with each other.

Chevron 9 steps
  • What Are Branches?

    4:44

  • Creating Branches

    8:44

  • Branch Basics

    6 questions

  • Another Topic Branch

    4:05

  • Branches Based on Other Topic Branches

    5:05

  • Topic Branches

    5 questions

  • Viewing Differences Between Branches

    3:05

  • Branches Behind the Scenes

    5:58

  • Branches Behind the Scenes

    4 questions

Merging

You have two branches. Both have changes you need, but when you check one out the changes in the other are no longer available. How do you get access to both at once? You merge the branches!

Chevron 4 steps
  • Merging Branches

    4:34

  • Merging Into Topic Branches

    4:02

  • Resolving Merge Conflicts

    7:18

  • Merging

    3 questions

Remote Branches

Collaborating with other developers is one of the biggest reasons to use Git. And to do that, you need to be able to bring changes from their Git repositories into your repo. You also need to be able to share changes from your repo to their repos. You do that using remote branches.

Chevron 8 steps
  • Remote Branches

    7:49

  • Remote Branches

    2 questions

  • Local Tracking Branches

    3:09

  • Local Tracking Branches

    3 questions

  • Pulling Commits

    2:35

  • Pushing a Branch

    4:19

  • Deleting a remote branch

    2:06

  • Updating Remote Branches

    3 questions

Branches on Git Hosting Services

Pushing and pulling directly to and from your collaborators' Git repos is a good skill to have. But most developers today work through a Git hosting service like GitHub, GitLab, or Bitbucket. Let's see how to apply what we've learned using a hosted repo.

Chevron 5 steps
  • Remote branches and GitHub

    3:04

  • Creating a Pull Request

    2:50

  • Reviewing a Pull Request

    2:10

  • Merging a Pull Request

    4:20

  • Remote Branches on a Hosting Service

    2 questions

Taught by

Jay McGavren

Reviews

Start your review of Git Branches and Merging Course (How To)

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.