Home > Article > Development Tools > How to submit code on gitee project
In open source software development, Gitee is a very popular code hosting platform. On this platform, you can share your code, communicate with developers, and participate in projects in the open source community. This article will introduce you to how to submit code on Gitee.
The first step is to create an account on Gitee. You can use your GitHub, WeChat, QQ, etc. account to register, or use your email address to register.
After successful registration, you need to create a new project. Click the "New Warehouse" button on Gitee's homepage and fill in relevant project information, such as project name, description, affiliated organization or individual, etc. Here, you also need to choose whether to use Git or SVN to manage your code.
You need to create a new branch in your project to submit changes. You can choose to create multiple branches according to your needs, such as development branches, test branches, and online branches.
Before development, you need to clone the project locally. Enter the project page, click the "Copy Project" button at the bottom of the page, then copy the SSH or HTTPS link address, and enter the following command in the local terminal:
git clone [repository url]
This will clone the code locally.
After modifying the code locally, you need to use Git to add and submit your changes.
git add .
git commit -m "添加注释"
After submitting the changes to the local warehouse, you need to push the code to your In Gitee project. Use the following command:
git push origin [branch]
where branch represents the branch of the code you submitted.
If you participate in a project of another person or organization, you need to submit a Pull Request to apply for merging your changes. Go to the project page, click the "Pull Request" button, then fill in some necessary information, such as the project name, modification description, and the name of the branch you want to merge into, and finally click "Create Pull Request" to submit the request.
With the above steps, you can successfully submit the code on Gitee.
The above is the detailed content of How to submit code on gitee project. For more information, please follow other related articles on the PHP Chinese website!