From your terminal using commands
Check your git version with the following command,git --version
git checkout -b newbranch
git push -u origin newbranch
The "-u" option is available only from git 1.7.0. It refers to "upstream" to where you want to push to or pull from.
From eclipse
Right click on your eclipse project Team -> Switch to -> New branch.
Give your new branch name in the following dialog and then click Finish. This will create a new branch from your current working branch.
Make all your changes to the new branch, to push the newly created branch right click Team -> Commit & Push (EGit2.x versions).
From github
The simplest way to create a new branch is from Github. If you have push access to the repository, start typing the new branch name in the search box of switch branches/tags. This box will appear once you click on the down arrow near branch. Once you complete typing the branch name, you will see an option to create new branch with the name provided. Click on it, you are done.
No comments:
Post a Comment