How to undo almost anything with Git (2015)
github.blog
How to undo almost anything with Git (2015)
1–10 of 84 posts
Re: How to undo almost anything with Git (2015)
#2Discussed at the time: https://news.ycombinator.com/item?id=9679367
Re: How to undo almost anything with Git (2015)
#3Discussed at the time: https://news.ycombinator.com/item?id=9679367
Managed to miss this first time, this is cool.
Also Merry Christmas and Happy New Year.
Re: How to undo almost anything with Git (2015)
#4It has always bugged me that
git commit --amend
Doesn't automatically resign (or fail to resign if the key isn't available) a signed git commit message. Anytime there is a non-verified git commit message in my history you can be sure it's because I was a dummy on the original message.Re: How to undo almost anything with Git (2015)
#5It's missing git revert merges
git revert -m 1 88113a64a21bf8a51409ee2a1321442fd08db705Re: How to undo almost anything with Git (2015)
#6This page is from 2015 yet hasn't once came up on my searches to do a bunch of these things. Thanks for resharing.
Re: How to undo almost anything with Git (2015)
#7TLDR: Reflog. That is all.
Re: How to undo almost anything with Git (2015)
#8It's missing git revert merges git revert -m 1 88113a64a21bf8a51409ee2a1321442fd08db705
PSA: You can safely refer to those long "commit-ish" identifiers using just the first 7 or 8 chars (eg `88113a64`) without real risk of collision. Let alone in examples / gists!
Re: How to undo almost anything with Git (2015)
#9git-extras has a tool called `git undo`. It's just a fancy wrapper around `git reset --soft HEAD` though.
Re: How to undo almost anything with Git (2015)
#10It has always bugged me that git commit --amend Doesn't automatically resign (or fail to resign if the key isn't available) a signed git commit message. Anytime there is a non-verified git commit message in my history you can be sure it's because I was a dummy on the original message.
Wait, seriously? I sign all my commits as habit and I `--amend` regularly. If this means my signature histories are broken…