SEARCH BY

All

  • All
  • Java8
  • Spring

How to create new branch from Git command line?

Post a Comment

Pre requirements

Your working environment should installed with Git and consider base branch name is Main

Create new branch based on Main branch


git checkout -b accountName/branchName
Following is the example

git checkout -b jelupuru/newLayout
After createing new branch in local, we need to push the branch to remote ( to Github or ADO repo or BitBucket etc... )

How to push new branch to remote

Following is the push command for the above new branch created

git push --set-upstream origin jelupuru/newLayout
jaya
I love software designing, coding, writing and teaching...

Share this article

Related Posts

Post a Comment

Place your code in <em> </em> tags to send in comments | Do not add hyper links in commnet

Close

Subscribe our newsletter for the latest articles directly into your email inbox