Find the commit that was HEAD of main on a given date.
IntermediateProductionRapid-fire commands
Answer
git rev-list -1 --before="2026-10-01 00:00" origin/main
More on Rapid-fire commands
Print the repository root directory.BeginnerPrint the current branch name (script-friendly).BeginnerList files changed in the last commit.BeginnerShow the commits I made in the last week.BeginnerShow commits on my branch that are not pushed yet, and commits waiting to be pulled.BeginnerList remote branches sorted by most recent commit.Intermediate