how-to-contribute
https://github.com/firstcontributions/first-contributions

怎么给开源项目提拉取请求(Pull Request)?

在 GitHub 上给开源项目提 PR(Pull Request)大致分为以下几个步骤:

1. Fork 项目

2. Clone 到本地

git clone https://github.com/你的用户名/项目名.git
cd 项目名

3. 添加上游(Upstream)远程仓库,这样能随时同步原项目的更新

git remote add upstream https://github.com/原作者/项目名.git

4. 创建新分支,不要在 main/master 上直接改动,可取的做法是新建一个分支

git checkout -b feature/你的修改内容

5. 修改代码并提交到 fork 仓库,在本地修改完成后

git add .
git commit -m "简要说明修改内容"
git push origin feature/你的修改内容

6. 提交 Pull Request

7. 等待维护者 Review

❤️ 转载文章请注明出处,谢谢!❤️