You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: developer_manual/getting-started/commits.rst
+60-76Lines changed: 60 additions & 76 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,130 +4,114 @@ Commits
4
4
Conventional commits
5
5
++++++++++++++++++++
6
6
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.
8
9
9
-
About the title of the commit, you should use the following format:
10
+
**Commit title format:**
10
11
11
-
.. code-block:: bash
12
+
.. code-block:: text
12
13
13
-
feat:my pull request <
14
+
feat: add button to open files
14
15
15
-
About the description of the commit, you should use the following format:
16
+
**Commit description format:**
16
17
17
-
.. code-block:: bash
18
+
.. code-block:: text
18
19
19
-
Pull Request Description
20
+
Short description of the pull request
20
21
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
33
24
25
+
Checklist:
26
+
- [x] Add "Open file" button
27
+
- [x] Add action to the button
34
28
35
29
DCO
36
30
+++
37
31
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:
39
36
37
+
``You must sign off your commits with a DCO signoff``
40
38
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.
47
40
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
+
-------------------------------------
54
43
55
-
.. code-block:: bash
44
+
There are two common issues to fix:
56
45
57
-
git rebase -i HEAD~2 <
46
+
1. Sign off your commits (DCO).
47
+
2. Use the `Conventional Commits <https://www.conventionalcommits.org/>`__ format.
58
48
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
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
62
51
63
-
.. code-block:: bash
52
+
1. Start an interactive rebase for the last 2 commits:
64
53
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
69
55
70
-
.. code-block:: bash
56
+
git rebase -i HEAD~2
71
57
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:
74
59
75
-
Save and close the editor.
60
+
.. code-block:: text
76
61
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
78
64
79
-
.. code-block:: bash
65
+
3. Amend the first commit:
80
66
81
-
git commit --amend --signoff <
82
-
83
-
When your editor opens, change the first line of the commit message from:
67
+
.. code-block:: bash
84
68
85
-
.. code-block:: bash
69
+
git commit --amend --signoff
86
70
87
-
App metadata: Add donation link to appear on Nextcloud appstore <
71
+
Change the title from:
88
72
89
-
to:
73
+
.. code-block:: text
90
74
91
-
.. code-block:: bash
75
+
App metadata: Add donation link to appear on Nextcloud appstore
92
76
93
-
docs: add donation link to appear on Nextcloud appstore <
77
+
To:
94
78
95
-
Save and close.
79
+
.. code-block:: text
96
80
97
-
Then:
81
+
docs: add donation link to appear on Nextcloud appstore
98
82
99
-
.. code-block:: bash
83
+
Save and close, then continue the rebase:
100
84
101
-
git rebase --continue <
85
+
.. code-block:: bash
102
86
103
-
Now you're on the second commit. Run:
87
+
git rebase --continue
104
88
105
-
.. code-block:: bash
89
+
4. Amend the second commit:
106
90
107
-
git commit --amend --signoff <
91
+
.. code-block:: bash
108
92
109
-
Change the first line from:
93
+
git commit --amend --signoff
110
94
111
-
.. code-block:: bash
95
+
Change the title from:
112
96
113
-
doc: add donation links to Github Sponsors and Stripe <
97
+
.. code-block:: text
114
98
115
-
to:
99
+
doc: add donation links to Github Sponsors and Stripe
116
100
117
-
.. code-block:: bash
101
+
To:
118
102
119
-
docs: add donation links to GitHub Sponsors and Stripe <
103
+
.. code-block:: text
120
104
121
-
Save and close.
105
+
docs: add donation links to GitHub Sponsors and Stripe
122
106
123
-
Then:
107
+
Save and close, then continue:
124
108
125
-
.. code-block:: bash
109
+
.. code-block:: bash
126
110
127
-
git rebase --continue<
111
+
git rebase --continue
128
112
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):
0 commit comments