mirror of
https://github.com/LucasVbr/first-contributions.git
synced 2026-05-14 17:21:51 +00:00
127 lines
6.2 KiB
Markdown
127 lines
6.2 KiB
Markdown
[](https://github.com/ellerbrock/open-source-badges/)
|
|
[<img align="right" width="150" src="https://firstcontributions.github.io/assets/gui-tool-tutorials/github-desktop-tutorial/join-slack-team.png">](https://join.slack.com/t/firstcontributors/shared_invite/zt-1hg51qkgm-Xc7HxhsiPYNN3ofX2_I8FA)
|
|
[](https://opensource.org/licenses/MIT)
|
|
[](https://www.codetriage.com/roshanjossey/first-contributions)
|
|
|
|
# 第一次做贡献
|
|
|
|
| <img alt="GitHub Desktop" src="https://desktop.github.com/images/desktop-icon.svg" width="200"> | GitHub Desktop Edition |
|
|
| ----------------------------------------------------------------------------------------------- | ---------------------- |
|
|
|
|
这是一个针对初次参与者的指南。
|
|
|
|
难。做任何事情的第一次总是难的。特别是在合作时,犯错并不是一件舒服的事情。但开源就是关于合作与共同工作的。我们想要简化新开源贡献者第一次学习和贡献的方式。
|
|
|
|
阅读文章和观看教程可以帮助,但实际操作而不搞砸任何事情会更好。这个项目旨在提供指导并简化新手做出他们的第一次贡献的方式。记住,你越放松,你学得就越好。如果你在寻找做出你的第一次贡献,只需跟随下面的简单步骤。我们保证这将是有趣的。
|
|
|
|
如果你的机器上没有GitHub Desktop,请[安装它](https://desktop.github.com/)。
|
|
|
|
如果你使用的是GitHub Desktop 1.0之前的版本,请[参考这个教程](github-desktop-old-version-tutorial.md)。
|
|
|
|
<img align="right" width="300" src="https://firstcontributions.github.io/assets/gui-tool-tutorials/github-desktop-tutorial/fork.png" alt="fork this repository" />
|
|
|
|
## Fork this repository
|
|
|
|
通过点击这个页面右上角的 fork 按钮来 fork 这个repository。这将在你的账户中创建这个repository的一个副本。
|
|
|
|
## Clone the repository
|
|
|
|
现在将这个repository克隆到你的机器上。
|
|
|
|
重要提示:不要克隆原始repository。去你的 fork repository然后克隆它。
|
|
|
|
要克隆repository,点击“Clone or Download”然后点击“Open in Desktop”。
|
|
|
|
克隆这个repository
|
|
|
|
一个弹出窗口将打开。点击“Open GitHubDesktop.exe”。
|
|
|
|
克隆这个repository
|
|
|
|
<img src="https://firstcontributions.github.io/assets/gui-tool-tutorials/github-desktop-tutorial/dt1-clonetodesktop.png" alt="克隆这个repository" />
|
|
|
|
在你点击“Open GitHubDesktop.exe”后,内容将被下载到你的计算机上。
|
|
|
|
<img src="https://firstcontributions.github.io/assets/gui-tool-tutorials/github-desktop-tutorial/dt1-open-githubdesktop.png" alt="克隆这个repository" />
|
|
|
|
克隆这个repository
|
|
|
|
现在你已经将第一个贡献者仓库在github的内容复制到了你的计算机上。
|
|
|
|
<img src="https://firstcontributions.github.io/assets/gui-tool-tutorials/github-desktop-tutorial/dt1-downloaded.png" alt="克隆这个repository" />
|
|
|
|
## Create a branch
|
|
|
|
现在通过点击顶部的“Current branch”图标然后点击“New branch”来创建一个分支:
|
|
|
|
<img src="https://firstcontributions.github.io/assets/gui-tool-tutorials/github-desktop-tutorial/dt1-create-branch.png" alt="创建一个分支" />
|
|
|
|
将你的分支命名为<add-your-name>。例如,“add-james-smith”
|
|
|
|
<img src="https://firstcontributions.github.io/assets/gui-tool-tutorials/github-desktop-tutorial/dt1-create-branch-name.png" alt="命名你的分支" />
|
|
|
|
点击 `Create branch`
|
|
|
|
## Make necessary changes and commit those changes
|
|
|
|
现在,转到历史标签页并通过右击然后在文本编辑器中打开Contributors.md文件。滚动到页面底部并添加你的名字,然后保存文件。
|
|
|
|
例如:如果你的名字是James Smith,它应该看起来像这样。
|
|
|
|
\[James Smith](https://github.com/jamessmith)
|
|
|
|
你可以看到Contributors.md有变化,它们已经被添加到Github Desktop。
|
|
|
|
<img src="https://firstcontributions.github.io/assets/gui-tool-tutorials/github-desktop-tutorial/dt1-status.png" alt="检查状态" />
|
|
|
|
现在提交这些变化:
|
|
|
|
在summary字段中写上"Add <your-name> to Contributors list"作为消息。
|
|
|
|
将<your-name>替换为你的名字。
|
|
|
|
点击写着Commit to add-your-name的按钮。
|
|
|
|
在底部,你可以看到已经创建了提交。
|
|
|
|
<img src="https://firstcontributions.github.io/assets/gui-tool-tutorials/github-desktop-tutorial/dt1-commit1.png" alt="提交你的变化" />
|
|
|
|
## Push changes to github
|
|
|
|
点击File->Options并登录到Github.com。输入你的Github用户名和密码。
|
|
|
|
<img src="https://firstcontributions.github.io/assets/gui-tool-tutorials/github-desktop-tutorial/dt1-sign-in.png" alt="登录到Github" />
|
|
|
|
点击右上角的Publish按钮。
|
|
|
|
<img src="https://firstcontributions.github.io/assets/gui-tool-tutorials/github-desktop-tutorial/dt1-publish1.png" alt="推送你的变化" />
|
|
|
|
推送你的变化
|
|
|
|
## Submit your changes for review
|
|
|
|
如果你去你在github上的仓库,你会看到Compare & pull request按钮。点击那个按钮。
|
|
|
|
<img src="https://firstcontributions.github.io/assets/gui-tool-tutorials/github-desktop-tutorial/compare-and-pull.png" alt="创建一个pull请求" />
|
|
创建一个拉取请求
|
|
|
|
现在提交拉取请求。
|
|
|
|
<img src="https://firstcontributions.github.io/assets/gui-tool-tutorials/github-desktop-tutorial/submit-pull-request.png" alt="提交pull请求" />
|
|
|
|
很快我就会将所有的更改合并到这个项目的master分支中。一旦更改被合并,你将收到通知邮件。
|
|
|
|
## Where to go from here?
|
|
|
|
恭喜!你刚刚完成了你会经常遇到的作为贡献者的标准fork -> clone -> edit -> PR工作流程!
|
|
|
|
庆祝你的贡献,并通过去[web app](https://firstcontributions.github.io#social-share)与你的朋友和追随者分享。
|
|
|
|
如果你需要任何帮助或有任何问题,你可以加入我们的[slack团队](https://join.slack.com/t/firstcontributors/shared_invite/zt-1hg51qkgm-Xc7HxhsiPYNN3ofX2_I8FA)。
|
|
|
|
### [Additional material](../additional-material/git_workflow_scenarios/additional-material.md)
|
|
|
|
## Tutorials Using Other Tools
|
|
|
|
[回到主页](https://github.com/firstcontributions/first-contributions#tutorials-using-other-tools)
|