From b80609e7505ac843574770fe90e9aa7856edc6f2 Mon Sep 17 00:00:00 2001 From: ARUL DEVARAJAN <arulkumaran.devarajan@huawei.com> Date: Wed, 23 Dec 2020 06:40:34 +0000 Subject: [PATCH] Add new file --- .../source/Readme/Contribution Process | 87 +++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 Documentation/source/Readme/Contribution Process diff --git a/Documentation/source/Readme/Contribution Process b/Documentation/source/Readme/Contribution Process new file mode 100644 index 0000000..825555f --- /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) +************************************************* + + + -- GitLab