Skip to content

Commit dd0fe24

Browse files
authored
docs: added about signing gpg to old commit
1 parent ddee0c6 commit dd0fe24

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

contributing/workflow.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,21 @@ For instance, to commit your work from a debugging session:
179179

180180
Just make sure that your commits in a feature branch are all related.
181181

182+
### Signing GPG Old Commits
183+
184+
Almost developer forgot signing GPG with params `-S` in commiting like `git commit -S -m "Signed GPG"`, you can signing old commit to keep secure.
185+
186+
```console
187+
> git switch your-branch
188+
> git commit --amend --no-edit -n -S
189+
> git push --force-with-lease origin your-branch
190+
```
191+
192+
But developer can secure commit without `-S` in `git commit`, you can set `git config --global commit.gpgsign true` and `git config --global user.signingkey 3AC5C34371567BD2` to all local repostory local or without `--global` to one local repostory.
193+
194+
> **Note**
195+
> `3AC5C34371567BD2` is your GPG Key ID
196+
182197
### Changing a Commit Message
183198

184199
See <https://docs.github.com/en/pull-requests/committing-changes-to-your-project/creating-and-editing-commits/changing-a-commit-message>.

0 commit comments

Comments
 (0)