Cathal O 'Donnell
Cathal O 'Donnell

Reputation: 525

GitHub creating a new branch and pushing to it

How do I create a new branch in Git hub called "stage 1" and then push my work up to that branch without saving over or harming what is in the master branch

Upvotes: 0

Views: 69

Answers (2)

Adem Öztaş
Adem Öztaş

Reputation: 21506

Branch name cannot contains space char.

Create a new branch,

git checkout -b stage-1

Develop anything. After that commit and push.

git commit -am . "commit message"
git push orgin stage-1

Upvotes: 2

Koen Janssen
Koen Janssen

Reputation: 19

This page explains how to create a branch. https://help.github.com/articles/creating-and-deleting-branches-within-your-repository/

Branch is just a copy of the master branch. So it won't harm anything in the master branch.

Upvotes: 0

Related Questions