How to quickly become an open source contributor Contributor
1. Environmental information
1.1 Hardware information
- Model : MacBook Pro
- Memory : 16GB
- Hard disk : 512GB SSD
- Processor : Apple M2
- Host CPU architecture : ARM
1.2 Software information
- Git version : 2.39.2 (Apple Git-143)
- Maven version : 3.8.8
- JDK version : 17
Two, Git installation
2.1 Introduction to Git
Git is a distributed version control system for managing and tracking changes to files. It can help developers or teams track code modification history, collaborate on development, manage codes of various versions , and provide functions such as rollback, branch management, and merging .
Using Git, developers can work independently on different branches, and then merge their changes into the main branch to keep the code clean and maintainable. Git is open source, easy to install and use, so it is widely used in software development and other version control scenarios.
2.2 Git download and install
Directly refer to the git official website: https://git-scm.com/
3. Selection of open source projects
Immortal Yi chose Apache Doris
Apache Doris is a high-performance, real-time analytical database based on MPP architecture . It is well known for its extremely fast and easy-to-use features. It only needs sub-second response time to return query results under massive data. It can not only support high concurrency The point query scenario can also support complex analysis scenarios with high throughput.
Based on this, Apache Doris can better meet usage scenarios such as report analysis, ad hoc query, unified data warehouse construction, data lake federation query acceleration, etc. Users can build user behavior analysis, AB experiment platform, log retrieval analysis, user Portrait analysis, order analysis and other applications.
4. GitHub participates in the open source process
4.1 Fork project
In GitHub, "fork" refers to the act of copying someone else's code base to your own account, and modifying and extending it on an independent branch.
When you find a project on GitHub you're interested in and want to improve on, contribute to, or use it as the basis for your own project, you can choose to fork that project. This will create a copy of the original project under your GitHub account, including all code, history, and branches.
After you fork, you can freely modify and experiment on your own copy of the project without affecting the stability and functionality of the original project. You can add new features, fix bugs, optimize the code, or customize it according to your needs.
After forking, you can submit your changes back to the original project, which is called a "pull request". The maintainer of the original project will review your changes and decide whether to accept your changes and merge them into the original project.
In this way, the fork feature provides a way for the open source community to collaborate , enabling projects to benefit from the strength of many contributors.
1. Click fork
2. Create fork
3. View fork
4.2 SSH configuration
4.2.1 Why configure SSH
git clone supports https and git (that is, ssh) to download source code:
when using git to download, if no ssh key is configured, the following error message will be reported:
4.2.2 How to configure SSH
1. First use the following command (if not specified, all commands are executed under the Git Bash tool by default) to check whether the user name and email address are configured (github supports us to log in with user name or email address):
git config --global --list
# 如下图所示,说明还没配置
2. Configure username and mailbox (skip if already configured)
# 可以在自己github的Settings中找到
git config --global user.name "这里换上你的用户名"
git config --global user.email "这里换上你的邮箱"
3. Check the user name and mailbox again (skip if the check is successful)
git config --global --list
# 如下图所示,说明配置成功
4. Generate a secret key
# 执行命令后需要进行3次或4次确认(可以一路回车)
ssh-keygen -t rsa -C "这里换上你的邮箱"
# 结果如下图所示,记住红框内id_rsa.pub文件路径,后续需要配置到github上
5. Open your github and enter the Settings configuration page
6. Select the SSH and GPG keys item and add it
7. Fill in the content of id_rsa.pub in the Key and Add
At this point, ssh is configured
4.3 Clone project
After the SSH configuration is complete, perform Clone again to download normally.
git clone [email protected]:yz-jayhua/doris.git
4.4 IDEA Association
1. Open the clone project
2. Open Settings and search for git
3. Click Test to let the idea automatically match and apply
4.5 PR Generation
Come to a simple document PR experience: modify a typo in a document
1. Locate the modified file
When checking the official document, I found the following typo, which corresponds to the address of the official document: DATETIME
2. Create a new branch from master to modify
3. Branch naming and creation
4. Automatically switch branches after creation
5. Submit the code to the local warehouse
Commit Message reference:
fix: Indicates that the commit is used to fix bugs or problems.
feat: Indicates that the commit was used to add new features.
docs: Indicates that the commit was used to update the documentation.
style: Indicates that the commit is used for code formatting or structural adjustment.
refactor: Indicates that the commit is for code refactoring, not adding new features or fixing bugs.
perf: Indicates that the commit is used to improve performance.
test: Indicates that the commit is for testing the code.
6. Push the code to the github warehouse
7. PR generation confirmation
At this time, when you refresh the project corresponding to the github personal warehouse, a PR request will appear, which means that the PR is generated successfully
4.6 PR submission
1. Click [Compare & pull request] and create a PR
2. Submit the result confirmation
After submission, the relevant pr number will be generated, and the follow-up process is as follows:
- There will be community partners for review (Apache Doris currently requires 2 small partners to review before proceeding to the next step, and different projects have different requirements)
- After the review is completed and confirmed, the pipeline will start to run, that is, various rule detections will be automatically performed on the project
- After all the pipelines are finished, the person in charge of the community will merge Merge
- After the merge is successful, congratulations on becoming an Apache Doris contributor (Contributor)
So far, you have quickly become an open source contributor (Contributor)~ If you encounter any problems during the review process, please leave a message or private message for communication.