Skip to content
Snippets Groups Projects
Unverified Commit b60f319d authored by Andrei Gherzan's avatar Andrei Gherzan :penguin:
Browse files

readme: Drop the Contribution-Process topic


This was basically just a git tutorial. We can resurrect it if we find
it valuable in the future.

This is also the last topic in the section so we can drop it from the
root index as well.

Signed-off-by: Andrei Gherzan's avatarAndrei Gherzan <andrei.gherzan@huawei.com>
parent 55b9b234
No related branches found
No related tags found
No related merge requests found
......@@ -26,7 +26,6 @@ headphones, and AR/VR glasses.
overview/index
meta-ohos/index
readme/README
contributing/README
ci/index
ip-policy/index
......
.. SPDX-FileCopyrightText: Huawei Inc.
..
.. SPDX-License-Identifier: CC-BY-4.0
.. _contribution-process:
.. include:: ../definitions.rst
Contribution Process
####################
.. contents::
:depth: 1
Contribution guidelines
***********************
|main_project_name| is an open-source project where the community can submit merge requests directly to the project. This section explains how to report a new issue, requests for enhancements and submit merge request to the project in GitLab so that your patch is merged into the source code.
Changes must be committed with detailed Git commit messages. Each commit message must contain:
* Short and descriptive subject line that is less than 72 characters, the subject line must include a prefix that identifies the subsystem being changed, followed by a colon, and a short title.
* A change description with your logic or reasoning for the changes.
* A Signed-off-by line, Signed-off-by: <name> <email> typically added automatically by using git commit -s
* When editing the commit message, explain the changes and why the changes are required along with issue number.
* If the merge request addresses an issue, include a line of the form as below:
.. code-block:: console
$ Fixes #<issue number>
Sign-off commit message
***********************
Each commit message in Pull request must be signed-off with a proper format as follows:
.. code-block:: console
$ Signed-off-by: OpenHarmony <sample@openharmonyproject.org>
* Commit message text can be added either manually or include *-s* or *--signoff* to your GitLab commit message. For example:
.. code-block:: console
$ Supported Boards Updation: Placeholder Updation
$ * Signed-off-by: OpenHarmony <sample@openharmonyproject.org>
* To amend and add sign-off message to the previous commit, run the following command:
.. code-block:: console
$ git commit --amend -s
* To force push your changes to GitLab commit message, run the following command:
.. code-block:: console
$ git push -f
Prerequisites
*************
* Create a GitLab account on https://gitlab.com/users/sign_up and have Git tools available on your development system.
* Find the repository that you are interested in on the code hosting platform of |main_project_name|.
Contribution Workflow
*********************
When contributing to the |main_project_name| Project, provide information about your change, update project documentation, and test your changes before you submit them.
To simplify the review, merge and rebase, and to modify the commit history, perform the following contribution workflow process:
1. Click the Fork button in project repo page to create a Fork of |main_project_name| to your personal account on GitLab.
2. To work locally on an existing remote repository, clone the source files to your local computer through HTTPS or SSH, run:
.. code-block:: console
$ git clone https://gitlab.com/<your-namespace>/sample-project.git
3. Navigate to the folder where source files were downloaded and add a remote repository:
.. code-block:: console
$ git remote add upstream git@gitlab.com:username/projectpath.git
4. Download the latest changes in the project, run:
.. code-block:: console
git pull <REMOTE> <name-of-branch>
5. Run the following command to verify the remote repositories:
.. code-block:: console
$ git remote -v
The remote repositories are displayed as following:
.. code-block:: console
$ origin https://gitlab.com/<your-namespace>/sample-project.git (fetch)
$ origin https://gitlab.com/<your-namespace>/sample-project.git (push)
$ upstream https://gitlab.com/gitlab-tests/sample-project.git. (fetch)
$ upstream https://gitlab.com/gitlab-tests/sample-project.git. (push)
6. Create a new branch based out of Master for making changes out of your local repository:
.. code-block:: console
$ git checkout master
$ git checkout -b <branch_name>
7. Make the changes locally and once committed, add the files to the remote repository:
.. code-block:: console
$ git add [modified file]
8. Commit your changes to your local repo. Include *-s* to include **Signed-off-by:** to the commit message.
.. code-block:: console
$ git commit -s
9. Push your new branch along with the changes to your fork in personal GitLab account:
.. code-block:: console
$ git push origin <branch_name>
10. Merge a branch with master branch, run:
.. code-block:: console
$ git checkout <branch_name>
$ git merge master
All the local changes are merged into the master branch.
.. Note::
For more details on using Git on the command line, see https://docs.gitlab.com/ee/gitlab-basics/start-using-git.html.
.. SPDX-FileCopyrightText: Huawei Inc.
..
.. SPDX-License-Identifier: CC-BY-4.0
.. include:: ../definitions.rst
Contributing Documents
======================
.. toctree::
:maxdepth: 2
Contribution-Process
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment