Is it possible to get commit logs/messages of a remote git repo without git clone

Murtaza Pitalwala picture Murtaza Pitalwala · Nov 18, 2013 · Viewed 28.2k times · Source

Is it possible to get commit logs/messages of a remote git repo without git clone?

The git repo I am working with is huge, even if I run git clone with --depth=1 still takes sometime before I am able to clone it.

I am looking for something like this,

git remote-log .

I have also looked in to git -ls-remote, which only provides the SHA and the Heads/tags. I am interested in getting the last 2 commit title, commit user and commit SHA?

Anyone know how to do that?

Answer

Noob picture Noob · Nov 26, 2014

If you are looking to see the last few commits of a branch, try:

git clone -b [branch name] --single-branch [repo url] --depth=3

This will clone only the last 3 commits on the branch you are interested. Once done you can get into the cloned repo and view the history.