I wanted to get a commit that was temporally some distance back as part of my experimentation with git cliff. This took some time to do, but here's what I ended up with:

git log  --since="72 hours ago" --until="now" --reverse --pretty=format:"%h" | head -1

Nothing particularly fancy, but I hope it's useful!

Lightning bolt
Subscribe to my newsletter

I publish monthly roundups of everything I've written, plus pictures of my corgi.
© 2024 Justin Duke · All rights reserved · have a nice day.