Files
first-contributions/docs/gui-tool-tutorials/translations/Chinese/github-desktop-tutorial.zh-cn.md
T
Roshanjossey b166a1d130 reset repo
2025-01-03 22:30:04 +01:00

118 lines
6.3 KiB
Markdown

[![Open Source Love](https://badges.frapsoft.com/os/v1/open-source.svg?v=103)](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)
[![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)](https://opensource.org/licenses/MIT)
[![Open Source Helpers](https://www.codetriage.com/roshanjossey/first-contributions/badges/users.svg)](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 |
| ----------------------------------------------------------------------------------------------- | ---------------------- |
万事开头难。特别是当你正与其他人合作的时侯,出错不是一件舒服的事情。不过,开源的本质就是和他人合作。我们想要简化开源初学者第一次学习和贡献的方法。
你可以通过阅读文章和观看教程来得到帮助,但是没有比实际去做而不搞砸更好的方法了。本项目旨在简化并指导初学者参与他们的第一次开源。记住:过程越轻松,学习效益越高。如果你想要做出第一次贡献,只需按照以下简单步骤操作即可。相信我们,这将会是一个有趣的过程 :)
如果你没有GithubDesktop在你的电脑上, [点我安装](https://desktop.github.com/).
如果你使用的是1.0之前的GitHub Desktop版本, [请参阅本教程](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(复制)本代码仓库
点击页面顶部的 “Fork” 按钮来分叉(Fork)这个仓库。这将在你的账户中创建这个存储库的副本。
## Clone(克隆)代码仓库
现在将这个储存库复制到你的电脑。
重要!:不要复制源储存库。请到自己的仓库并复制
要克隆仓库,请单击“Clone or Download”,然后单击“Open in Desktop”。
<img src="https://firstcontributions.github.io/assets/gui-tool-tutorials/github-desktop-tutorial/dt1-clonetodesktop.png" alt="clone this repository" />
一个弹出窗口将会打开。点击“打开GitHubDesktop.exe”。
<img src="https://firstcontributions.github.io/assets/gui-tool-tutorials/github-desktop-tutorial/dt1-open-githubdesktop.png" alt="clone this repository" />
点击“打开GitHubDesktop.exe”后,内容将下载到您的计算机上。
<img src="https://firstcontributions.github.io/assets/gui-tool-tutorials/github-desktop-tutorial/dt1-downloaded.png" alt="clone this repository" />
现在,您已经将github中first-contributions存储库的内容复制到了您的计算机上。
## 创建分支
现在,点击顶部的“Current branch”图标,然后点击“New branch”,即可创建分支:
<img src="https://firstcontributions.github.io/assets/gui-tool-tutorials/github-desktop-tutorial/dt1-create-branch.png" alt="make a branch" />
命名你的分支<添加你的名字>。例如,“add-james-smith”
<img src="https://firstcontributions.github.io/assets/gui-tool-tutorials/github-desktop-tutorial/dt1-create-branch-name.png" alt="name your branch" />
点击 `Create branch`
## 进行必要的更改并提交这些更改
现在,转到历史记录选项卡,右键单击并在文本编辑器中打开文本编辑器中的“Contributors.md”文件。滚动到页面底部并添加您的姓名,然后保存文件。
例子: 如果你的名字是 James Smith, 它因该看起来像这样.
\[James Smith](https://github.com/jamessmith)
您可以看到对Contributors.md进行了更改,并且已将其添加到GithubDesktop。
<img src="https://firstcontributions.github.io/assets/gui-tool-tutorials/github-desktop-tutorial/dt1-status.png" alt="check status" />
现在提交这些更改:
在_summary_字段中写下消息“Add `<你的名字>`to Contributors list”。
将“<你的名字>”替换为你的名字。
点击按钮,上面写着 `Commit to add-your-name`.
<img src="https://firstcontributions.github.io/assets/gui-tool-tutorials/github-desktop-tutorial/dt1-commit1.png" alt="commit your changes" />
在底部,您可以看到提交已创建。
<img src="https://firstcontributions.github.io/assets/gui-tool-tutorials/github-desktop-tutorial/dt1-commit2.png" alt="commit your changes" />
## 将更改推送到github
点击文件->选项,登录Github.com。输入您的Github用户名和密码.
<img src="https://firstcontributions.github.io/assets/gui-tool-tutorials/github-desktop-tutorial/dt1-sign-in.png" alt="log-in to Github" />
点击右上角的“Publish”按钮。
<img src="https://firstcontributions.github.io/assets/gui-tool-tutorials/github-desktop-tutorial/dt1-publish1.png" alt="push your changes" />
## 提交您的更改以供审核
如果你去github上的仓库,你会看到“Compare & pull request”按钮。点击那个按钮。
<img src="https://firstcontributions.github.io/assets/gui-tool-tutorials/github-desktop-tutorial/compare-and-pull.png" alt="create a pull request" />
现在提交拉取请求.
<img src="https://firstcontributions.github.io/assets/gui-tool-tutorials/github-desktop-tutorial/submit-pull-request.png" alt="submit pull request" />
很快,我将把您的所有更改合并到这个项目的主分支中。合并更改后,您将收到一封通知电子邮件。
## 下一步我该去哪里?
恭喜!您刚刚完成了作为贡献者经常遇到的标准_fork->clone->edit->PR_工作流程!
庆祝你的贡献,并通过以下方式与你的朋友和追随者分享[web app](https://firstcontributions.github.io#social-share).
如果您需要帮助或有任何问题,可以加入我们的slack team. [加入 slack team](https://join.slack.com/t/firstcontributors/shared_invite/zt-1hg51qkgm-Xc7HxhsiPYNN3ofX2_I8FA).
### [附加材料](../additional-material/git_workflow_scenarios/additional-material.md)
## 使用其他工具的教程
[返回主页](https://github.com/firstcontributions/first-contributions#tutorials-using-other-tools)