Tuesday, August 9, 2016

[Git] Create and Merge a branch

 GIT   GitHub  


Create a branch



$ git checkout -b [new branch name]
$ git push --set-upstream origin [new branch name]




Merge a branch



Branch : myBranch
Target : master

If I wanna merge [myBranch] to [master], then the command will be like this,


git checkout master
git pull origin master
git merge myBranch
git push origin master


Reference



No comments:

Post a Comment