start with git

Start with git

1.what is GitHub?

GitHub is a code hosting platform for version control and collaboration.

GitHub是一款版本控制和共同协作的软件.

 

2.what is the difference between git and github?

git是一款免费, 开源的分布式版本控制系统, github是一个用git做版本控制的项目管理平台, 有点类似客户端(git)和服务器(github). 相当于本地、公司服务器、Github网站服务器都装Git做版本控制,只不过Github的服务器强大些,对全球用户托管的项目用Git做版本控制!

 

 

3.create a repository.

如何创建一个仓库, 可参照github使用文档,https://guides.github.com/activities/hello-world/

 

4.create a branch.

如何创建一个分支, 可参照github使用文档,https://guides.github.com/activities/hello-world/

 

5.make and commit changes.

如果有个master分支, 然后在master的基础上建立一个分支, 假如叫new-branch. 现在就有了两个分支, masternew-branch. 并且new-branch分支的内容和master分支一样. 注意:现在修改new-branch分支里的内容, 并提交, 此时master分支和new-branch分支的内容就不一样了.

 

6.open a pull request

pull requestgithub共同协作的核心. 当你把github仓库的东西下载到本地时, 它会提醒github仓库与本地文件的不同点.

如何open a pull request:

a.点击new pull request按钮

b.选择你新建的branch(new-branch), 与原始的master branch对比

c.new-branchmaster分支有哪些改动, 增加会用绿色表示(并在前面有"+"), 删除会用粉红色表示(并在前面有"-")

d.如果你认为修改的地方是你同意的, 则点击create pull request按钮

e.给你的修改写一些描述

f.写完之后, 再点击create pull request按钮

 

7.merge your pull request

混合你的提交, 即把你的new-branchmaster分支混合:

a.点击merge pull request按钮来把你的new-branch混合到master分支

b.点击confirm merge

c.回到前面, 由于这些变化已经混合了, 所有可以删除new-branch, 点击delete branch按钮

 

参考:https://guides.github.com/activities/hello-world/

posted @ 2017-06-03 20:20  大海中的一粒沙  阅读(319)  评论(1编辑  收藏  举报