643 B
Executable File
643 B
Executable File
author | date | title | tags | uuid | |||
---|---|---|---|---|---|---|---|
Alvie Rahman | \today | Git |
|
8eb93ba5-72e8-4c25-b1f5-02e25408a14d |
Fix detached head
From https://stackoverflow.com/a/10229202:
To Delete Changes
git checkout main
To Keep Changes
git branch temp
git checkout main
git pull . temp
git branch -D temp
Retroactively Sign Commits
From https://webdevstudios.com/2020/05/26/retroactively-sign-git-commits/:
-
git rebase -i HEAD~<number of commits to sign>
-
Replace
pick
withreword
:In vim:
:%s/^pick/reword/:wq
-
Save all commit messages
-
Force push to remote