From the course: Git: Branches, Merges, and Remotes
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Create branches
- In this movie, we're going to learn how to create branches. Before we create our first branch, let's just start by looking at the branches that are there currently. If I type git space branch then it will show me a list of the branches. When I hit return, you see it comes up and there's only one branch. It's the master branch and by default, that's the name that every git project gives when you first initialize the project. It says alright all commits are going to be on one master branch. That's the starting point. Notice that there's also an asterisk over on the far left and that it's colored green. That's to indicate that this is the current branch or the currently checked out branch. At the moment, there is only one branch but once there are several, only one of them will be designated as the current branch. Okay, now let's create a branch. I told you that creating branches was very easy, it really is, git branch and then a space, and then the name of our branch. I'm going to…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
(Locked)
Branching overview4m 33s
-
(Locked)
Create branches3m 18s
-
(Locked)
Switch branches2m 27s
-
Create and switch branches3m 22s
-
(Locked)
Switch branches with uncommitted changes3m 39s
-
(Locked)
Compare branches4m 39s
-
(Locked)
Rename branches2m 21s
-
(Locked)
Delete branches4m
-
(Locked)
Configure command prompt6m 46s
-
(Locked)
-
-
-
-
-
-