doc: clarify the "fork and pull" process in contributing guide (#41474)

Signed-off-by: codingjaguar <jiang.chen@zilliz.com>
pull/41531/head
Jiang Chen 2025-04-25 16:23:52 +08:00 committed by GitHub
parent 70b311735b
commit 0b75ea56a4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 11 additions and 5 deletions

View File

@ -74,12 +74,18 @@ Once the 2 labels are on your PR, and all actions pass, your PR will be merged i
Generally, we follow the "fork-and-pull" Git workflow.
1. [Fork](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo) the repository on GitHub.
2. Clone your fork to your local machine with `git clone git@github.com:<yourname>/milvus.git`.
3. Create a branch with `git checkout -b my-topic-branch`.
4. [Commit](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/committing-changes-to-a-pull-request-branch-created-from-a-fork) changes to your own branch, then push to GitHub with `git push origin my-topic-branch`.
5. Submit a [pull request](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests) so that we can review your changes.
* [Fork](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo) the [Milvus repo](https://github.com/milvus-io/milvus/tree/master) on GitHub.
* Clone your fork to your local machine with `git clone git@github.com:<yourname>/milvus.git`.
* Work in your local repo and file a PR.
In your local repo:
1. [Configure](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/configuring-a-remote-repository-for-a-fork) your local repo by adding the remote official repo as upstream.
2. Then you can create a branch, make changes and [commit](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/committing-changes-to-a-pull-request-branch-created-from-a-fork).
3. Lastly, fetch upstream (and resolve merge conflicts if necessary), rebase and push the changes to origin. You can submit a [pull request](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests) to get your code reviewed.
4. Once getting approved, your code can be merged to `master`, yay!
Here is the process illustrated in details:
![](docs/developer_guides/figs/fork-and-pull.png)
Remember to [sync your forked repository](https://docs.github.com/en/github/getting-started-with-github/fork-a-repo#keep-your-fork-synced) _before_ submitting proposed changes upstream. If you have an existing local repository, please update it before you start, to minimize the chance of merge conflicts.