mahemoff
mahemoff

Reputation: 46429

Git checkout repository from N days ago

How can I check out a git repository using time notation such as "3 days ago", "12 months ago", etc?

Note this related question only concerns the local repo, but I want to inspect the remote repo.

Upvotes: 13

Views: 2802

Answers (1)

Thorsten Staerk
Thorsten Staerk

Reputation: 1156

git checkout by date gives me

git checkout `git rev-list -n 1 --before="3 days ago" master`

Upvotes: 14

Related Questions