mxsr / Git commit gpg sign rebase

Last active 4 months ago

Like 0

mxsr revised this gist 1 year ago · 1dda6d5

1 file changed, 7 insertions, 1 deletion

rebase-git-commits-gpg-sign.md
@@ -1,5 +1,11 @@
1 1 #### Rebase all commits from the `root` commit and sign them with the (new) gpg key
2 2
3 - ```sh
3 + ```bash
4 4 git rebase --root --gpg-sign --committer-date-is-author-date --root
5 + ```
6 +
7 + #### Rebase all commits from the `root` commit, sign them with the new key and reset the author
8 +
9 + ```bash
10 + git rebase --exec 'git commit --amend --no-edit -n -S --reset-author --quiet' --committer-date-is-author-date --root
5 11 ```

mxsr revised this gist 1 year ago · 799ef36

1 file changed, 5 insertions

rebase-git-commits-gpg-sign.md (file created)
@@ -0,0 +1,5 @@
1 + #### Rebase all commits from the `root` commit and sign them with the (new) gpg key
2 +
3 + ```sh
4 + git rebase --root --gpg-sign --committer-date-is-author-date --root
5 + ```