Git branching, create a new branch, push to remote


Here's how you create a new git branch, and then push it to a remote repo.

follow me — @malcolmtyson
Create the new branch locally...

git checkout -b name-of-branch
Then to push it to your remote repo...

git push origin name-of-branch
Then set the upstream (so it knows where to pull from)

git branch --set-upstream name-of-branch origin/name-of-branch
You are all done! Now go get yourself a sandwich.

If you liked this — you should follow me on twitter.

Read More Posts »