Backend and Infrastructure

Working with Git Branches and Tags

This page is archived

We're keeping this page up as a courtesy to folks who may need to refer to old instructions. We don't plan to update this page.

Sprout Video

In this lesson we'll take a look at creating branches with the git branch command, and tags with the git tag command and explain the differences. Then we'll look at how and when they can be used and how to move changes from one branch to another using the git merge and git rebase commands and talk about the different ways in which those two commands effect the history of a project.

Note that Blake is using a shortcut for his git commit command, and is instead just using git ci. He is also using a nice, short way to add a commit message all at the same time, by adding the -m flag, for message, to his commit command. You can learn more about git aliases in the following video:

Blake is also using a command line modifier which displays the branch he is currently working in. There are many ways you can do this too. Blake recommends the following resource:…

Additional resources

"A successful Git branching model" article