From the course: Coding Exercises: Git

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

Working on multiple branches

Working on multiple branches - Git Tutorial

From the course: Coding Exercises: Git

Working on multiple branches

(electronic music) - [Instructor] Let's say you're working hard on a new feature and your boss calls you and all of a sudden you needs to jump on another feature branch. Is there a way to work on more than one branch at the same time? I'll give you a couple of seconds to think about how you would do something like that. (bouncy playful music) Now you may have been thinking about using stashes and that works okay, but worktrees are a lot more powerful. So you can issue a git worktree command and you can see all of the options. We can add, we can list, we can remove worktrees if we want to. Now let's clear this out, and I'll show you that I have a couple of uncommitted files. And it doesn't even matter. If I want to pull something and... Let's take a look at some of the branches that I have here. So let's say that I wanted to work with 04_01b locally and not have to stash anything, just very quickly jump into…

Contents