Git one-liner: get the earliest commit from X hours ago

from blog Applied Cartography, | ↗ original
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!