Nacos Contributing Flow
This contribution flow is applicable to all Nacos community content, including but not limited to
The following use contributing
Nacos as an example to explain the contribution flow in detail.
1. Fork Alibaba/Nacos repository to your Github.
2. Clone your fork Nacos repository to local.
3. Add Alibaba/Nacos repository as upstream repo.
4. Choose a basic branch of development usually upstream/develop,and create a new branch based on it.
5. Do your change in your local develop branch.
First please make sure you read and set the
Nacos code style correctly, please read the related content Code of Conduct.
When making changes, please ensure that the changes on this branch are only relevant to the issue, and try to be as small as possible, so that only one thing is modified in one branch, and only one thing is modified in one PR.
At the same time, please use your English description as much as possible for your commits. It is mainly described by predicate + object, such as:
Fix xxx problem/bug.
Some simple commits can be described using
For xxx, such as:
If the commits is related to an ISSUE, you can add the ISSUE number as a prefix, such as:
For #10000, Fix xxx problem/bug.
6. Rebase develop branch
When you make changes, other people’s changes may have commited and merged. At this time, there may be conflicts. Please use the rebase command to merge and resolve. There are two main benefits:
- Your submission record will be very clean, without the words
Merge xxxx branch.
- After rebase, the commit log of your branch is also a single chain, it is easier to check back.
If you are using Intellij IDEA, it is recommended to use the IDE version control, which has a more convenient visual panel to resolve conflicts and squash operations.
7. Push your develop branch to your fork repository.
8. Create Pull Request according to the pull request template
The Nacos community will review your Pull Request and may propose comments.
You can return to step 5 to modify code according to the comments and use step 6 to resubmit.
If you are prompted that there are conflicts when you push to fork repo again, Force push to your fork branch will be ok. The reason of conflicts is that the commit ID has changed after you rebase with others changes.