Join Ray Villalobos for an in-depth discussion in this video Controlling state with branches, part of Up and Running with Git and GitHub.
- View Offline
- Branches in Git are like having the ability…to create alternate universes, and in the last video,…we created our first branch by checking something out…from the logs.…You can create a branch whenever you want,…and there's a lot of really useful branch commands…that you should be comfortable with.…First, let's take a look at the two branches…that we have right now, so I'll do a git branch command,…and notice that it's showing me there are two branches.…The one with the star right here is the branch…that we're currently on, which is master,…and then we have this alternate branch…that we created in the previous video.…
Now, let's say that we really like the work…that we've done so far, and we want to save…the current state of our files,…so that we can always get back to this point.…So, to create a new branch, we're just gonna use…the branch command, and then give it a name…of what we wanna call this branch.…So, it should be git branch, and then a name.…I'll call this app01.…Now, if you do a git branch command,…
Want to explore Git and GitHub in more depth? Watch Git Essential Training for more comprehensive coverage of these tools.