Skip to content

How To Pull Requests

zjx-kimi edited this page Jul 29, 2024 · 1 revision

How To Pull Requests

Introduction

Welcome to the OI (Olympiad in Informatics) repository on GitHub! This guide will walk you through the process of making a Pull Request to contribute to this project. Whether you are a seasoned programmer or just starting out, your contributions are valuable to us. By following these steps, you can become part of the OI community and help improve the resource for everyone.

Getting Started

Fork the Repository

Before you can submit changes, you'll need to fork the OI repository to your own GitHub account. This creates a copy of the repository that you can freely make changes to without affecting the original project.

Clone the Forked Repository

Once you have forked the repository, you'll need to clone it to your local machine using git clone [URL]. This will download all the repository files to your computer.

Make Your Changes

Now that you have the repository on your local machine, you can make the necessary changes. Whether it's fixing a bug, adding new features, or updating documentation, every contribution is appreciated.

Commit Your Changes

After you have made your changes, you need to commit them to your local repository using git commit -m "Description of changes". This prepares your changes to be pushed back to your forked repository.

Push Changes to Your Fork

To update your forked repository with the changes you've made, use git push origin branch-name. This will push your changes to your GitHub repository.

Making a Pull Request

Navigate to Your Fork

Go to your GitHub account and navigate to the forked OI repository. You should see a message indicating that you recently pushed a new branch. Click on the "Compare & pull request" button.

Create the Pull Request

Review the changes you have made and provide a brief description of what you have done. Click on the "Create pull request" button to submit your changes for review.

Wait for Review

After creating the Pull Request, a project maintainer will review your changes. They may provide feedback or ask for additional modifications. Be responsive to these requests to ensure your Pull Request gets merged.

Celebrate!

Once your Pull Request is approved and merged into the main OI repository, congratulations - you've successfully contributed to the project!

Conclusion

By following these steps, you can easily make Pull Requests to the OI repository and contribute to the growth of the project. Remember, open source is about collaboration and sharing knowledge. Your contributions, big or small, help make the coding world a better place for everyone.

Thank you for being a part of the OI community!


如何创建 Pull Requests

简介

欢迎来到 GitHub 上的 OI(信息学奥林匹克竞赛)存储库!本指南将指导您完成制作 Pull Request 的过程,以便为这个项目做出贡献。无论您是经验丰富的程序员还是刚刚入门,您的贡献对我们来说都是宝贵的。通过按照这些步骤,您可以成为 OI 社区的一员,并帮助改进资源,造福所有人。

入门指南

Fork 存储库

在提交更改之前,您需要将 OI 存储库 fork 到您自己的 GitHub 帐户中。这样可以创建存储库的副本,您可以自由地对其进行更改,而不会影响原始项目。

克隆 Fork 的存储库

一旦您 fork 了存储库,您需要使用 git clone [URL] 将其克隆到本地计算机。这将把存储库的所有文件下载到您的计算机上。

进行更改

现在您在本地计算机上有了存储库,您可以进行必要的更改。无论是修复错误、添加新功能还是更新文档,每一次贡献都是可贵的。

提交更改

完成更改后,您需要使用 git commit -m "更改描述" 将它们提交到本地存储库。这将准备好将您的更改推送回 fork 的存储库。

将更改推送到 Fork

要使用 git push origin 分支名称 更新您 fork 的存储库中的更改。这将把您的更改推送到您的 GitHub 存储库。

创建 Pull Request

导航到您的 Fork

转到您的 GitHub 帐户,并导航到 fork 的 OI 存储库。您应该看到一个消息,指示您最近推送了一个新分支。点击“Compare & pull request”按钮。

创建 Pull Request

审查您所做的更改,并简要描述您所做的内容。点击“Create pull request”按钮以提交您的更改供审核。

等待审核

创建 Pull Request 后,项目维护者将会审查您的更改。他们可能会提供反馈或要求进行额外的修改。请及时响应这些请求,以确保您的 Pull Request 被合并。

庆祝一下!

一旦您的 Pull Request 被批准并合并到主要的 OI 存储库中,恭喜您!您已成功为项目做出贡献!

结论

通过遵循这些步骤,您可以轻松地向 OI 存储库创建 Pull Requests 并为项目的发展做出贡献。请记住,开源是关于合作和分享知识的。您的贡献,无论大小,都有助于使编码世界对每个人都变得更好。

感谢您成为 OI 社区的一员!

希望这篇指南能帮助您更好地了解如何为开源项目做出贡献。如果有任何疑问或需要进一步帮助,请随时向社区寻求支持。开源世界欢迎您的贡献!