My Commits and Tags Are Now Signed

Announcement I’m now signing my git commit and tags with an SSH key. Details of the fingerprint can be found in the security document. It says that commit after 2024-01-01 are going to be signed, because I’m starting now on one machine and I will propagate the configuration over the next few days to other machines. Why Why bother with cryptographic signatures? Anyone can pretend to be me. They just need to write my name and email in the author fields of a commit message. However1, I’m the only one able to produce signatures with that particular public key. This will help to check that I’m actually the author of the commits and tags you rely on when using my code. ...

December 29, 2023 · 3 min · Clément Joly

Quick Git Commit Amend

Sometimes when your pull request is reviewed, it turns out that you have to make a small change. For instance, you have to remove a white space. Here is a really quick way to fix it, that will not even fire your editor to change the commit message. Make sure you are on the branch of the pull request (for instance, by reading the output of git status) Edit and save your file, removing the white space. Then in your terminal, use: git commit --amend -a -v -C HEAD This edits (--amend) your last commit, adding all the changes made to files (-a) and reusing the last commit message (-C HEAD). Once this is done, a summary is printed (-v). You can now push your changes with: git push --force-with-lease We need --force-with-lease to “confirm to the server that we really want to edit the last commit”. Caution Two words of caution with this technique: ...

November 21, 2021 · 2 min · Clément Joly

Git ls-files is Faster Than Fd and Find

The git ls-files command is up to 5 times faster than fd or find. But why?

November 4, 2021 · 10 min · Clément Joly