freeCodeCamp/guide/chinese/miscellaneous/how-to-contribute-via-a-pul.../index.md

27 lines
2.1 KiB
Markdown
Raw Normal View History

---
title: How to Contribute Via a Pull Request
localeTitle: 如何通过拉取请求进行贡献
---
> 拉取请求PR是一种向开源项目提交贡献的方法。它通常是使用分布式版本控制系统DVCS如Git向项目提交贡献的首选方式。
FreeCodeCamp是一个开源项目所有内容都可以自由编辑。
* [用叉子](https://help.github.com/articles/fork-a-repo/)在GitHub上的项目。
* [将其克隆](https://help.github.com/articles/cloning-a-repository/)到本地计算机。不要在github.com中在线编辑因为编辑器可能会导致JSON格式数据出现问题。
* 使用表单`fix/some-bug`或`feature/add-cool-thing` [创建一个分支](https://help.github.com/articles/creating-and-deleting-branches-within-your-repository/) ,并在该分支中进行更改并提交它们。
* 在线[推送](https://help.github.com/articles/pushing-to-a-remote/)分支(如果在本地编辑)。
* 针对**“staging”**分支[创建拉取请求](https://help.github.com/articles/creating-a-pull-request/) 。
* PR的标题也称为主题应描述您的更改。即`fix typo in basic-javascript challenge`
* 如果PR旨在解决特定问题请附加到PR的提交消息`closes #1337` 。如果公关合并这告诉GitHub关闭该问题。
* 不要将问题编号添加到PR的标题中。即`minor improvements in basic-javascript challenge`
这些是PR的一般指导原则适用于大多数项目。在查看项目的提交历史记录时它为每个人提供了快速的更改指南。
_注意并非所有拉取请求都被接受。 FCC项目维护人员将解释不接受的原因。_
## 进一步阅读
* [GitHub和Git基础培训](https://www.youtube.com/playlist?list=PLg7s6cbtAD15G8lNyoaYDuKZSKyJrgwB-) - 如何使用Git和GitHub
* [FreeCodeCamp贡献指南](https://github.com/FreeCodeCamp/FreeCodeCamp#contributing)
* [如何编写Git提交消息](http://chris.beams.io/posts/git-commit/)
* [如何将FCC克隆到Windows PC](https://forum.freecodecamp.com/t/how-to-clone-and-setup-the-free-code-camp-website-on-a-windows-pc/19366)