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 a remote branch

Create a remote branch

From the course: Git: Branches, Merges, and Remotes

Start my 1-month free trial

Create a remote branch

- [Narrator] Once we've created a remote repository on GitHub and we've told our project how to find it, now we're ready to create remote branches. Inside your project let's use git branch to remind ourselves what branches we have. And you can see I'm not on my master branch so I'm going to go ahead and checkout master. Now what I want to do, is I want to take that master branch and I want to push all of that code up to the remote repository. Let's say it has some collaborators are going to be working with it. So I want to push it up there and make it available to them. Now we do this on a branch by branch basis so I can have local branches that only I see and only I work with that's great cause I can experiment and everyone doesn't have to be looking over my shoulder. But then I can also have branches which are shared and which are remote. So I want to make master into one of those branches while I leave the others all local. So the command we're going to use for that is git push…

Contents