2016年8月9日 星期二

[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



沒有留言:

張貼留言