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

后端 未结 2 723
情话喂你
情话喂你 2021-01-13 06:42

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

相关标签:
2条回答
  • 2021-01-13 07:37

    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>'
    
    0 讨论(0)
  • 2021-01-13 07:38

    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.

    0 讨论(0)
提交回复
热议问题