Create a github branch and merge using command line
1. change into the working directory
2. check what branch you are on
Note that the star signifies the current branch
3. switch to master branch (if necessary) and make sure you are update on the master branch
if you are not on master branch, this switches you to the master branch
this updates the master branch
$ git checkout -b newBranch
this creates a new branch named “newBranch”, and switches to it
git push origin newBranch
6. set upstream of the branch
git branch --set-upstream-to=origin/branch name
7. work on that branch for a while
$git commit -m “the commit message”
It commits the work, and creates a commit message
check to make sure the branch is clean
9. switch to master branch again and make sure it’s updated
10. switch to newBranch and merge master
12. go to github website and make a pull request
13. on the github website compare and review
14. on the github website create a pull request
15.on the github website send the pull request to your team mate for them to review
16. If anything goes well, your team mate will click on the confirm merge
17. Then s/he will delete the branch on the github website
18. Now delete the branch on your local computer