Git 与 GitHub

与传统的版本控制工具SVN相比,Git更适用于团队协作。

关于Git与GitHub的讲述,这篇文章给了比较清晰的解释。(Link

大致步骤为:

创建本地分支
在本地分支上编辑修改,然后提交
推送提交(Push)到 Github
创建发布请求(Pull Request),说明该分支包含了哪些更改
合并(Merge)分支内容到主分支
将主分支上的最新提交拉取(pull)到本地
重复上述步骤

这里面有一个比较容易混淆的概念,Pull Request和Pull。Stackflow上的如下答案个人觉得比较贴切:

【pull】 If you use git pull, you pull the changes from the remote repository into yours.

【pull request】 If you send a pull request to another repository, you ask their maintainers to pull 
your changes into theirs (you more or less ask them to use a git pull from your repository).

关于Github桌面版使用方式,这篇文章有比较详细的描述:(Link) 

猜你喜欢

转载自blog.csdn.net/marvinchen003/article/details/80298113