github的简单使用
github官网使用文档见:
https://guides.github.com/activities/hello-world/
1.注册github账号
2.右上角+号,选择new repository,如图输入Repository name,可以给出简短的Description,选择Initialize this repository with a README。然后点击Create repository
3.创建分支(Branch)
默认分支是master,我们在将各类代码或修改提交至master之前可以使用其他的分支。
进入你的new repository hello-world
选择branch的下拉框,输入新的branch的名字,选择蓝色的create branch按钮。
4.进行修改并提交修改
比如先修改一下readme-edits分支中的readme。点击pencil按钮,修改readme内容之后commit changes。此时readme-edits和master分支中的readme不同。
5.创建pull request
pull request —>New pull request—>create pull request
6.将分支内容合并至master
可以merge pull request , 并且可以在成功之后删除分支。