diff --git a/Documentation/source/Readme/Contribution Process b/Documentation/source/Readme/Contribution Process new file mode 100644 index 0000000000000000000000000000000000000000..825555ff0a394dcf1e82c5ded10ddefab50f55df --- /dev/null +++ b/Documentation/source/Readme/Contribution Process @@ -0,0 +1,87 @@ +Contribution Process +#################### +* Preparations +* Downloading Code +* Committing Code +* Creating a Pull Request +* Building Access Control +* Reviewing Code + +Preparations +************ +* Install, configure, and use Git. For details, visit https://gitee.com/help/categories/43. +* Register an SSH public key. For details, visit https://gitee.com/help/articles/4181. +* Find the repository that you are interested in on the code hosting platform of OpenHarmony. + +Downloading Code +**************** + +Forking a Code Branch from the Cloud +************************************ +#. Find and open the homepage of the repository. +#. Click the Fork button in the upper right corner, and create an individual cloud fork branch as prompted. + +Downloading the Fork Repository to the Local Host +************************************************* + +Perform the following steps to download the code in the repository to your computer: + +#. Create a local working directory. +A local working directory is used for searching and managing local code. + + mkdir ${your_working_dir} + +Parse the generated XML data from doxygen to generate the traceability matrix. + +#. Clone the remote repository to the local host. +* You can copy the address of the remote repository on the repository page. +* Run the following command on the local host: + + git clone $remote_link + +Using the repo Tool to Download Code Repositories in Batches +************************************************************ +* Download the repo tool. (For details, see https://gitee.com/help/articles/4316.) + + curl https://gitee.com/oschina/repo/raw/fork_flow/repo-py3 > /usr/local/bin/repo + chmod a+x /usr/local/bin/repo + pip install -i https://pypi.tuna.tsinghua.edu.cn/simple requests + +* Download code repositories. (There is no repo branch parameter.) + repo init -u https://gitee.com/openharmony/manifest.git -b master + repo sync -c + +Committing Code +*************** +Committing a Repository (git clone) +=================================== + +#. Update the local branch. + + git fetch origin + git checkout master + git pull --rebase + +Update the local debugging branch (myfeature branch) based on the remote master branch. + + git branch myfeature origin/master + git checkout myfeature +Then, edit and modify the code in the myfeature branch + +#. Commit the changes in the local working directory. + + git add . + git commit -m "Reason" + +You may continue to edit and test more content after the previous commit. You can use commit --amend to commit these changes. + +#. Push the changes to your remote directory. +If you plan to review (or just establish a remote backup of your work), push the branch to your fork repository: + + git push -f origin myfeature + +Committing Multiple Repositories (repo init/sync) +************************************************* + + +