The Unclear Impact

On signing git commits…

So today I realised that I forgot to add the global setting to make me automatically sign my git commits:

git config --global commit.gpgsign true

(Just setting up your user.signingkey isn’t enough.)

Also, you can go rebase your whole history to sign all your commits using:

git rebase --signoff --root

(However, you’ll end up with a linear history and lose any branch/merge history, etc.)

On signing git commits…
@aral wouldn't just signing the last commit be sufficient? The hash of a commit depends on all parent commits anyways (which is, incidentally, an _actual_ use case for Merkle trees)
replies
0
announces
0
likes
2

On signing git commits…

@aral git rebase --rebase-merges is a thing

On signing git commits…

@ikke Ooh, thanks, I’ll have a play tomorrow :)

On signing git commits…

@aral If I were looking at your history over time, rather than seeing a total rewrite (including rewriting hashes), I would prefer for you to add a single, signed, empty commit with a message along the following lines:

> I hereby assert that the current state of the code is as I expect. Signed, Aral.

That preserves history and tells the truth: you didn't sign each commit, but you are happy to sign the current state and will keep on doing so moving forward.

On signing git commits…

@samir Good shout, thanks.

I guess signing commits after a certain commit also implicitly makes that point.

(Also related: https://pleroma.marussy.com/objects/70b52bfb-d403-4109-a552-6dec5a6d68f6)

On signing git commits…

@aral@mastodon.ar.al I didn't know you could go back and sign your old commits!

re: On signing git commits…
@julia @aral you can even change the author/email too if you're a mad lass, for example if they contain a deadname

re: On signing git commits…

@lewdum @julia Ah, good use case :)

re: On signing git commits…

@lewdum @julia Yep, any rewriting of history requires a force push.

re: On signing git commits…

@lewdum @julia (I just realised that sounds far more profound than it is.) :)