Skip to content

Commit 36a3dca

Browse files
committed
chore: reorganize conventional commits and DCO section
Signed-off-by: Vitor Mattos <1079143+vitormattos@users.noreply.github.com>
1 parent 967f0cd commit 36a3dca

1 file changed

Lines changed: 60 additions & 76 deletions

File tree

developer_manual/getting-started/commits.rst

Lines changed: 60 additions & 76 deletions
Original file line numberDiff line numberDiff line change
@@ -4,130 +4,114 @@ Commits
44
Conventional commits
55
++++++++++++++++++++
66

7-
If you want to know more about `Convertional Commits <https://www.conventionalcommits.org/en/v1.0.0/>`__, you can read the documentation.
7+
LibreSign follows the `Conventional Commits <https://www.conventionalcommits.org/en/v1.0.0/>`__ specification.
8+
This makes commit history more readable and allows automatic tools to generate changelogs.
89

9-
About the title of the commit, you should use the following format:
10+
**Commit title format:**
1011

11-
.. code-block:: bash
12+
.. code-block:: text
1213
13-
feat:my pull request <
14+
feat: add button to open files
1415
15-
About the description of the commit, you should use the following format:
16+
**Commit description format:**
1617

17-
.. code-block:: bash
18+
.. code-block:: text
1819
19-
Pull Request Description
20+
Short description of the pull request
2021
21-
Related Issue
22-
23-
Issue Number: #830
24-
25-
Pull Request Type
26-
27-
- Feature
28-
29-
Pull request checklist
30-
31-
- [X] Add button "Open file"
32-
- [x] Add action to the button <
22+
Related issue: #830
23+
Type: Feature
3324
25+
Checklist:
26+
- [x] Add "Open file" button
27+
- [x] Add action to the button
3428
3529
DCO
3630
+++
3731

38-
If you want to know more about `DCO(Developer Certidicate of Origin) <https://developercertificate.org/>`__, you can read the documentation.
32+
LibreSign also requires commits to be signed off with the
33+
`DCO (Developer Certificate of Origin) <https://developercertificate.org/>`__.
34+
35+
If you see the error message:
3936

37+
``You must sign off your commits with a DCO signoff``
4038

41-
* Possible error envolve DCO
42-
43-
.. figure:: images/dco_error.png
44-
:alt: DCO error screen.
45-
46-
If you see the error message "``You must sign off your commits with a DCO signoff``", it means that you need to add a signoff to your commit message. You can do this by adding the following line to your commit message:
39+
it means your commits are missing the ``Signed-off-by`` line.
4740

48-
There are two things to fix:
49-
50-
* 1. Sign off your commits (for DCO)
51-
* 2. Use the [Conventional Commits](https://www.conventionalcommits.org) format for commit messages
52-
53-
Considering that you have 2 commits, at your terminal, run:
41+
Fixing DCO errors and commit messages
42+
-------------------------------------
5443

55-
.. code-block:: bash
44+
There are two common issues to fix:
5645

57-
git rebase -i HEAD~2 <
46+
1. Sign off your commits (DCO).
47+
2. Use the `Conventional Commits <https://www.conventionalcommits.org/>`__ format.
5848

59-
The number 2 is about the quantity of commits ahead you will rebase.
60-
61-
You’ll see your commits listed like this:
49+
Example: rebasing two commits
50+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6251

63-
.. code-block:: bash
52+
1. Start an interactive rebase for the last 2 commits:
6453

65-
pick e49199874 App metadata: Add donation link to appear on Nextcloud appstore <
66-
pick 1ed4561ad doc: add donation links to Github Sponsors and Stripe <
67-
68-
Change both lines from `pick` to `edit`:
54+
.. code-block:: bash
6955
70-
.. code-block:: bash
56+
git rebase -i HEAD~2
7157
72-
edit e49199874 App metadata: Add donation link to appear on Nextcloud appstore <
73-
edit 1ed4561ad doc: add donation links to Github Sponsors and Stripe <
58+
2. Change ``pick`` to ``edit`` for both commits:
7459

75-
Save and close the editor.
60+
.. code-block:: text
7661
77-
Now you'll be editing the first commit. Run:
62+
edit e49199874 App metadata: Add donation link to appear on Nextcloud appstore
63+
edit 1ed4561ad doc: add donation links to Github Sponsors and Stripe
7864
79-
.. code-block:: bash
65+
3. Amend the first commit:
8066

81-
git commit --amend --signoff <
82-
83-
When your editor opens, change the first line of the commit message from:
67+
.. code-block:: bash
8468
85-
.. code-block:: bash
69+
git commit --amend --signoff
8670
87-
App metadata: Add donation link to appear on Nextcloud appstore <
71+
Change the title from:
8872

89-
to:
73+
.. code-block:: text
9074
91-
.. code-block:: bash
75+
App metadata: Add donation link to appear on Nextcloud appstore
9276
93-
docs: add donation link to appear on Nextcloud appstore <
77+
To:
9478

95-
Save and close.
79+
.. code-block:: text
9680
97-
Then:
81+
docs: add donation link to appear on Nextcloud appstore
9882
99-
.. code-block:: bash
83+
Save and close, then continue the rebase:
10084

101-
git rebase --continue <
85+
.. code-block:: bash
10286
103-
Now you're on the second commit. Run:
87+
git rebase --continue
10488
105-
.. code-block:: bash
89+
4. Amend the second commit:
10690

107-
git commit --amend --signoff <
91+
.. code-block:: bash
10892
109-
Change the first line from:
93+
git commit --amend --signoff
11094
111-
.. code-block:: bash
95+
Change the title from:
11296

113-
doc: add donation links to Github Sponsors and Stripe <
97+
.. code-block:: text
11498
115-
to:
99+
doc: add donation links to Github Sponsors and Stripe
116100
117-
.. code-block:: bash
101+
To:
118102

119-
docs: add donation links to GitHub Sponsors and Stripe <
103+
.. code-block:: text
120104
121-
Save and close.
105+
docs: add donation links to GitHub Sponsors and Stripe
122106
123-
Then:
107+
Save and close, then continue:
124108

125-
.. code-block:: bash
109+
.. code-block:: bash
126110
127-
git rebase --continue <
111+
git rebase --continue
128112
129-
After this, you'll complete the rebase flow and be able to push your branch. Since this changes past commits, you’ll need to push with force:
113+
5. Push your branch with force (since commit history has changed):
130114

131-
.. code-block:: bash
115+
.. code-block:: bash
132116
133-
git push --force-with-lease origin patch-2 <
117+
git push --force-with-lease origin patch-2

0 commit comments

Comments
 (0)