Git Branches and Merging
Coming November 2018…
- Development Tools
About this Course
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
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.
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!
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__.
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.
Resident Ruby and Go teacher for Treehouse. Author of Head First Ruby, a tutorial book on the core Ruby language.