{"thread":{"id":"8266","subject":"just fetching HEAD of repository","startedAt":"2007-05-21T09:01:00Z","lastAt":"2007-05-25T10:56:44Z","messageCount":4,"participants":["Stian Haklev","Matthieu Moy","Guilhem Bonnefille","Jakub Narebski"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"42872","messageId":"566574ef0705210201wc5c0adbmaa22d197b16bf72d@mail.gmail.com","threadId":"8266","inReplyTo":null,"subject":"just fetching HEAD of repository","fromName":"Stian Haklev","fromEmail":"shaklev@gmail.com","sentAt":"2007-05-21T09:01:00Z","receivedAt":"2007-05-21T09:01:00Z","isPatch":false,"sender":{"key":"shaklev@gmail.com","avatar":"https://gravatar.com/avatar/5bf03e21cb89e751dd1477528835dcb4a3b39805288525c230ce02f53a94e57d?d=mp&s=160"},"body":"After checking all the docs, I am still wondering if there is a way to\nget only the last commit from a given git repository. Sometimes I\nreally just want the latest code so I can compile it - and let's say\nthey are not running gitweb, or it is not convenient to go to gitweb\nand ask for a tar package to be made? This is especially relevant in\ncountries with slow internet connection - here in Indonesia it takes\nme an hour to clone the git repository for example, never mind let's\nsay the Linux kernel.\n\nThank you\nStian\n"},{"id":"42873","messageId":"vpqhcq6fsr9.fsf@bauges.imag.fr","threadId":"8266","inReplyTo":"566574ef0705210201wc5c0adbmaa22d197b16bf72d@mail.gmail.com","subject":"Re: just fetching HEAD of repository","fromName":"Matthieu Moy","fromEmail":"matthieu.moy@imag.fr","sentAt":"2007-05-21T09:08:58Z","receivedAt":"2007-05-21T09:08:58Z","isPatch":false,"sender":{"key":"git@matthieu-moy.fr","avatar":"https://avatars.githubusercontent.com/u/14709?v=4"},"body":"\"Stian Haklev\" <shaklev@gmail.com> writes:\n\n> After checking all the docs, I am still wondering if there is a way to\n> get only the last commit from a given git repository. Sometimes I\n> really just want the latest code so I can compile it - and let's say\n> they are not running gitweb, or it is not convenient to go to gitweb\n> and ask for a tar package to be made? This is especially relevant in\n> countries with slow internet connection - here in Indonesia it takes\n> me an hour to clone the git repository for example, never mind let's\n> say the Linux kernel.\n\nYou'll probably pay the price for not downloading the full history\nlater, but yes, what you're looking for is called \"shallow clone\", and\nit's possible with the --depth option of git-clone (I personnally\nnever tried it, though).\n\nSide question: once you have a shallow clone, is it possible to\n\"unshallow\" it, that is, fetch the missing revisions?\n\n-- \nMatthieu\n"},{"id":"43040","messageId":"8b65902a0705231012p7b711094qc855a2805f2fd255@mail.gmail.com","threadId":"8266","inReplyTo":"566574ef0705210201wc5c0adbmaa22d197b16bf72d@mail.gmail.com","subject":"Re: just fetching HEAD of repository","fromName":"Guilhem Bonnefille","fromEmail":"guilhem.bonnefille@gmail.com","sentAt":"2007-05-23T17:12:27Z","receivedAt":"2007-05-23T17:12:27Z","isPatch":false,"sender":{"key":"guilhem.bonnefille@gmail.com","avatar":"https://gravatar.com/avatar/375364bfee1f61197c540e37465abe3619fc24eb3a36b0edcea7f15b124036b0?d=mp&s=160"},"body":"Are you looking for something to \"shallow clone\" the remote git repo\n(as replyed by Matthieu, or something more similar to the \"cvs export\"\nor \"svn export\" commands (ie exporting a current snapshot, not a\nworking repo)?\n\nOn 5/21/07, Stian Haklev <shaklev@gmail.com> wrote:\n> After checking all the docs, I am still wondering if there is a way to\n> get only the last commit from a given git repository. Sometimes I\n> really just want the latest code so I can compile it - and let's say\n> they are not running gitweb, or it is not convenient to go to gitweb\n> and ask for a tar package to be made? This is especially relevant in\n> countries with slow internet connection - here in Indonesia it takes\n> me an hour to clone the git repository for example, never mind let's\n> say the Linux kernel.\n>\n> Thank you\n> Stian\n> -\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n>\n\n\n-- \nGuilhem BONNEFILLE\n-=- #UIN: 15146515 JID: guyou@im.apinc.org MSN: guilhem_bonnefille@hotmail.com\n-=- mailto:guilhem.bonnefille@gmail.com\n-=- http://nathguil.free.fr/\n"},{"id":"43231","messageId":"f36f3t$teg$1@sea.gmane.org","threadId":"8266","inReplyTo":"566574ef0705210201wc5c0adbmaa22d197b16bf72d@mail.gmail.com","subject":"Re: just fetching HEAD of repository","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2007-05-25T10:56:44Z","receivedAt":"2007-05-25T10:56:44Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Stian Haklev wrote:\n\n> After checking all the docs, I am still wondering if there is a way to\n> get only the last commit from a given git repository. Sometimes I\n> really just want the latest code so I can compile it - and let's say\n> they are not running gitweb, or it is not convenient to go to gitweb\n> and ask for a tar package to be made? This is especially relevant in\n> countries with slow internet connection - here in Indonesia it takes\n> me an hour to clone the git repository for example, never mind let's\n> say the Linux kernel.\n\nDepending on what you want, try either:\n\n  $ git clone --depth=1 <repository URL>\n\nor\n\n  $ git archive --remote=<repository URL> HEAD\n\n(if the remote side supports it)\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"}]}