Add retroactive signing to git.md
This commit is contained in:
parent
6872e0e4e0
commit
a2aff0171e
18
git.md
18
git.md
@ -8,7 +8,7 @@ tags: [ linux, programming, git ]
|
|||||||
|
|
||||||
# Fix detached head
|
# Fix detached head
|
||||||
|
|
||||||
From https://stackoverflow.com/a/10229202 :
|
From <https://stackoverflow.com/a/10229202>:
|
||||||
|
|
||||||
## To Delete Changes
|
## To Delete Changes
|
||||||
|
|
||||||
@ -24,3 +24,19 @@ git checkout main
|
|||||||
git pull . temp
|
git pull . temp
|
||||||
git branch -D temp
|
git branch -D temp
|
||||||
```
|
```
|
||||||
|
|
||||||
|
# Retroactively Sign Commits
|
||||||
|
|
||||||
|
From <https://webdevstudios.com/2020/05/26/retroactively-sign-git-commits/>:
|
||||||
|
|
||||||
|
1.
|
||||||
|
```
|
||||||
|
git rebase -i HEAD~<number of commits to sign>
|
||||||
|
```
|
||||||
|
|
||||||
|
2. Replace `pick` with `reword`:
|
||||||
|
|
||||||
|
In vim: `:%s/^pick/reword/:wq`
|
||||||
|
|
||||||
|
3. Save all commit messages
|
||||||
|
4. Force push to remote
|
||||||
|
Loading…
x
Reference in New Issue
Block a user