Learn How to View and Create Branches With Git


show more Viewing and creating branches provides you with in-depth training on Developer. Taught by Kevin Skoglund as part of the Git Essential Training show less
please wait ...

Viewing and creating branches

In this movie, we're going to learn how to create a branch. To begin with, let's start by looking at our current branch. The way you can see all the branches in our local repository is git branch. And it's just by itself git branch will show us a list of the branches that we have on our local machine. I only have one, and it is master, the default branch. And you can see there is an asterisk next to it. That lets you know that that's the branch that we're on now. We refer to that as the current branch or the currently checked out branch. You may remember from our discussion about the HEAD pointer that the reference for the HEAD pointer is stored in the .git folder.

So cat .git/HEAD, and inside there what that file contains is a reference to one of the branches, because HEAD always points to the tip of a branch. So the HEAD says all right, here is the branch that I'm on now, and then we can go in that folder to find out what the actual tip is. I can do ...

Viewing and creating branches
Video duration: 2m 57s 6h 25m Beginner

Viewers:

Viewing and creating branches provides you with in-depth training on Developer. Taught by Kevin Skoglund as part of the Git Essential Training

Subject:
Developer
Software:
Git GitHub
Author:
please wait ...