How do I view the latest commits of a remote Git repository without making a clone first?

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?

  • How to commit a long Git merge in the middle of resolving conflicts
  • Remove file from commit
  • How to suppress “Changes not staged for commit”?
  • Can git commit “empty versions” of new files?
  • Cannot Commit to the SVN - CHECKOUT can only be performed on a version resource
  • Git/Github allow collaborators but keep control
  • Can a GIT branch have a subset of data?
  • Can multiple files be specified when using BFG?
  • git create new branch with same name, will it be pushed to the same remote?
  • how to re-parent in Git
  • How can I reorder/combine commits using Git rebase?
  • jgit - cloning a repo creates files with my default umask permission and not the permissions in the repo
  • 2 Solutions collect form web for “How do I view the latest commits of a remote Git repository without making a clone first?”

    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>'
    

    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.

    Git Baby is a git and github fan, let's start git clone.