Push a New Branch to github that Doesn't Exist Remotely Yet

InstructorChris Achard

Share this video with your friends

Send Tweet

We'll make a new feature branch with:

git checkout -b new-branch

and then when we make changes and commit them, we can try to push that branch with:

git push

However, in order to get the branch to exist on github as well, we need to set the upstream of the local branch at the same time with:

git push --set-upstream origin new-branch