benwiz
benwiz

Reputation: 2317

Using git cli, how can I get the date and time of the latest commit of a repository that I have access to but have not cloned?

I need to check the datetime of the latest commit of a repo I will not have cloned, but do have access to via ssh keys.

EDIT: just realized my question was imprecise and is not the question I needed to ask. Closing this and will ask again.

Upvotes: 0

Views: 38

Answers (1)

David Neiss
David Neiss

Reputation: 8237

Clone and try a git log --all --date-order -n 1 --pretty=format:%cd. Note that there are many date formats, see https://git-scm.com/docs/pretty-formats.

If you don't want to clone the entire repo, try using --depth flag on the clone to limit the history you are pulling down.

Upvotes: 1

Related Questions