From dd0fe24551b3d5f5b4b19aa77612ece8c3f514ed Mon Sep 17 00:00:00 2001 From: Denny Septian Panggabean <97607754+ddevsr@users.noreply.github.com> Date: Mon, 5 Sep 2022 10:35:46 +0700 Subject: [PATCH 1/2] docs: added about signing gpg to old commit --- contributing/workflow.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/contributing/workflow.md b/contributing/workflow.md index cde1f2eb5de6..13fe82c8fa8f 100644 --- a/contributing/workflow.md +++ b/contributing/workflow.md @@ -179,6 +179,21 @@ For instance, to commit your work from a debugging session: Just make sure that your commits in a feature branch are all related. +### Signing GPG Old Commits + +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. + +```console +> git switch your-branch +> git commit --amend --no-edit -n -S +> git push --force-with-lease origin your-branch +``` + +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. + +> **Note** +> `3AC5C34371567BD2` is your GPG Key ID + ### Changing a Commit Message See . From fb23aed0bee9c4a090e1fc97acd9faf827c68fb3 Mon Sep 17 00:00:00 2001 From: Denny Septian Panggabean <97607754+ddevsr@users.noreply.github.com> Date: Mon, 5 Sep 2022 13:49:44 +0700 Subject: [PATCH 2/2] docs: update signing in `latests` & `all commit` --- contributing/workflow.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/contributing/workflow.md b/contributing/workflow.md index 13fe82c8fa8f..fd5d14384875 100644 --- a/contributing/workflow.md +++ b/contributing/workflow.md @@ -183,12 +183,20 @@ Just make sure that your commits in a feature branch are all related. 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. +Latests commit : ```console > git switch your-branch > git commit --amend --no-edit -n -S > git push --force-with-lease origin your-branch ``` +All commit (will be change date commit to today) : +```console +> git switch your-branch +> git rebase -i --root --exec 'git commit --amend --no-edit -n -S' +> git push --force-with-lease origin your-branch +``` + 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. > **Note**