5

I want to get a list of the latest commits on a certain remote Git repository. However, I do not want to create a clone because that takes too long.

With SVN, I can simply pass along a username and password. With Git I haven't found an option to do this. Also, is there an XML output option like with SVN?

tshepang
  • 12,111
  • 21
  • 91
  • 136
  • possible duplicate of http://stackoverflow.com/questions/4994004/git-getting-info-about-a-change-without-a-local-repository . Other answer suggests using `git ls-history {url}` to lookup the available tags and branches and their latest commit id's to check if a new commit has been made to a branch. – michael Jun 08 '12 at 08:24

2 Answers2

2

This is probably not exactly what you want, but you could create a shallow clone using the --depth option to git clone. That clones only the last n revisions. It still copies all the content, though.

For XML-like formatting you could use a custom log format like this:

git log --pretty=format:'<commit><author>%ae</author><subject>%s</subject></commit>'
MForster
  • 8,806
  • 5
  • 28
  • 32
0

You can fetch from the remote repository. This does not merge the changes into your local code, but is represented locally by a branch for the remote repository, with the latest commits.

I.e., you can see individual commits to the remote repository and even cherry-pick single commits if you want.

Ingvald
  • 443
  • 1
  • 4
  • 12