git command to create a branch
//Create a New Branch
git checkout -b [name_of_your_new_branch]
//First Push
git push --set-upstream origin [name_of_your_new_branch]
git command to create a branch
//Create a New Branch
git checkout -b [name_of_your_new_branch]
//First Push
git push --set-upstream origin [name_of_your_new_branch]
Working with branches in Git
$ git branch my_feature # Creating the branch
$ git checkout my_feature # Changing the codebase so that we're on that branch now
$ git checkout -b my_feature # This does the two previous operations in one ;)
$ git add file1 file2
$ git commit -m "Meaningful commit message" # We didn't just commit this on the master branch like last time, but on the my_feature one
$ git add .
$ git commit -m "Other meaningful commit message"
$ git push origin my_feature # Notice: we're not pushing master anymore, you just create a new remote branch
create branch in git
# Create New Branch And Switch To It
$ git checkout -b myBranchName
git merge branch to master
$ git checkout master
Switched to branch 'master'
$ git merge iss53
Merge made by the 'recursive' strategy.
index.html | 1 +
1 file changed, 1 insertion(+)
creating new branch in git
Create a new branch named issue1.
$ git branch testing
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us