{"thread":{"id":"15888","subject":"View remote logs?","startedAt":"2008-10-14T07:19:07Z","lastAt":"2008-10-14T08:21:52Z","messageCount":3,"participants":["Todd A. Jacobs","Jeff King","Michael J Gruber"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"92991","messageId":"20081014071907.GP16999@penguin.codegnome.org","threadId":"15888","inReplyTo":null,"subject":"View remote logs?","fromName":"Todd A. Jacobs","fromEmail":"nospam@codegnome.org","sentAt":"2008-10-14T07:19:07Z","receivedAt":"2008-10-14T07:19:07Z","isPatch":false,"sender":{"key":"nospam@codegnome.org","avatar":null},"body":"I've Googled around, and tried some experiments with likely-looking\ntools like git log, git diff, and git ls-remote, but they only seem to\noperate on the local repository. In particular, there doesn't seem to be\nan obvious way to view the commit logs on a remote repository without\npulling it first.\n\nOn an intuitive level, it seems like \"git log origin\" would allow me to\nsee what someone has committed to a remote repository so I can decide\nwhether it's something I want to pull. Even something like \"git diff\nHEAD origin\" would let me know if there were changes I might want to\npull before doing so.\n\nAm I missing something obvious? Is it possible to use the CLI to view\nremote logs, or is the only choice to pull everything?\n\n-- \n\"Oh, look: rocks!\"\n\t-- Doctor Who, \"Destiny of the Daleks\"\n"},{"id":"92992","messageId":"20081014081024.GA9344@coredump.intra.peff.net","threadId":"15888","inReplyTo":"20081014071907.GP16999@penguin.codegnome.org","subject":"Re: View remote logs?","fromName":"Jeff King","fromEmail":"peff@peff.net","sentAt":"2008-10-14T08:10:26Z","receivedAt":"2008-10-14T08:10:26Z","isPatch":false,"sender":{"key":"peff@peff.net","avatar":"https://avatars.githubusercontent.com/u/45925?v=4"},"body":"On Tue, Oct 14, 2008 at 12:19:07AM -0700, Todd A. Jacobs wrote:\n\n> I've Googled around, and tried some experiments with likely-looking\n> tools like git log, git diff, and git ls-remote, but they only seem to\n> operate on the local repository. In particular, there doesn't seem to be\n> an obvious way to view the commit logs on a remote repository without\n> pulling it first.\n\nRemember that pull is really \"fetch + merge\". So you can do just the\nfetch part without affecting your local branches.\n\n> On an intuitive level, it seems like \"git log origin\" would allow me to\n> see what someone has committed to a remote repository so I can decide\n\nIt does. It just uses the remote tracking branch for \"origin\" instead of\ncontacting the remote.\n\n> whether it's something I want to pull. Even something like \"git diff\n> HEAD origin\" would let me know if there were changes I might want to\n> pull before doing so.\n\nAnd that works, too. Once fetched, you can use \"origin\" as you would any\nother ref.\n\n-Peff\n"},{"id":"92993","messageId":"48F456A0.701@drmicha.warpmail.net","threadId":"15888","inReplyTo":"20081014071907.GP16999@penguin.codegnome.org","subject":"Re: View remote logs?","fromName":"Michael J Gruber","fromEmail":"git@drmicha.warpmail.net","sentAt":"2008-10-14T08:21:52Z","receivedAt":"2008-10-14T08:21:52Z","isPatch":false,"sender":{"key":"git@grubix.eu","avatar":"https://avatars.githubusercontent.com/u/233215?v=4"},"body":"Todd A. Jacobs venit, vidit, dixit 14.10.2008 09:19:\n> I've Googled around, and tried some experiments with likely-looking\n> tools like git log, git diff, and git ls-remote, but they only seem to\n> operate on the local repository. In particular, there doesn't seem to be\n> an obvious way to view the commit logs on a remote repository without\n> pulling it first.\n> \n> On an intuitive level, it seems like \"git log origin\" would allow me to\n> see what someone has committed to a remote repository so I can decide\n> whether it's something I want to pull. Even something like \"git diff\n> HEAD origin\" would let me know if there were changes I might want to\n> pull before doing so.\n> \n> Am I missing something obvious? Is it possible to use the CLI to view\n> remote logs, or is the only choice to pull everything?\n\nYou can always fetch (rather than pull) and then decide whether to pull\n(i.e. merge or rebase FETCH_HEAD) or not.\n\nThe problem with \"remote log\" is that log can show diffstats, full diffs\netc, so that it would need all new objects anyways.\n\nIf you want to avoid fetching new objects the only way is to run git log\netc. on the remote side. You can do this with ssh, but the other\ntransports (git:, http:) don't support this.\n\nMichael\n"}]}