{"thread":{"id":"18473","subject":"Newbie: Do I need to download the entire repo to work on just 1 file?","startedAt":"2009-03-22T22:08:07Z","lastAt":"2009-03-22T23:36:08Z","messageCount":8,"participants":["Anthony Rasmussen","Sverre Rabbelier","Geoffrey Lee","Nicolas Sebrecht"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"108943","messageId":"BLU121-W15DB0E5CEBC1DA697E5ED8B4950@phx.gbl","threadId":"18473","inReplyTo":null,"subject":"Newbie: Do I need to download the entire repo to work on just 1 file?","fromName":"Anthony Rasmussen","fromEmail":"evoluenta@hotmail.com","sentAt":"2009-03-22T22:08:07Z","receivedAt":"2009-03-22T22:08:07Z","isPatch":false,"sender":{"key":"evoluenta@hotmail.com","avatar":null},"body":"\n\nHi all,\n\nThe large website has a developers-only version of the site published on a server, which is tracked by git.\n\nI\nonly have to work on 1 file.  I'd like to work on it, test changes on\nthe dev site, work on it some more, then commit when ready.\n\nDo I have to download the entire rep onto my laptop in order to do this?  I have read and read, but I am quite confused :)\n\nThanks for your help!\n\n_________________________________________________________________\nGet quick access to your favorite MSN content with Internet Explorer 8. \nhttp://ie8.msn.com/microsoft/internet-explorer-8/en-us/ie8.aspx?ocid=B037MSN55C0701A"},{"id":"108951","messageId":"fabb9a1e0903221600j22cf028fl903aef8076e53777@mail.gmail.com","threadId":"18473","inReplyTo":"BLU121-W15DB0E5CEBC1DA697E5ED8B4950@phx.gbl","subject":"Re: Newbie: Do I need to download the entire repo to work on just 1 file?","fromName":"Sverre Rabbelier","fromEmail":"srabbelier@gmail.com","sentAt":"2009-03-22T23:00:59Z","receivedAt":"2009-03-22T23:00:59Z","isPatch":false,"sender":{"key":"srabbelier@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3098?v=4"},"body":"Heya,\n\nOn Sun, Mar 22, 2009 at 23:08, Anthony Rasmussen <evoluenta@hotmail.com> wrote:\n> Do I have to download the entire rep onto my laptop in order to do this?  I have read and read, but I am quite confused :)\n\nYes, you do, in general though, git repositories are quite compact\ncompared to, say, a svn checkouts. It is not unheard of that the full\ngit clone is smaller than the same code as svn checkout.\n\n-- \nCheers,\n\nSverre Rabbelier\n"},{"id":"108952","messageId":"83d7aaa40903221606yd84412cna873554f7f58a75f@mail.gmail.com","threadId":"18473","inReplyTo":"fabb9a1e0903221600j22cf028fl903aef8076e53777@mail.gmail.com","subject":"Re: Newbie: Do I need to download the entire repo to work on just 1 file?","fromName":"Geoffrey Lee","fromEmail":"geoffreyj.lee@gmail.com","sentAt":"2009-03-22T23:06:20Z","receivedAt":"2009-03-22T23:06:20Z","isPatch":false,"sender":{"key":"geoffreyj.lee@gmail.com","avatar":"https://gravatar.com/avatar/eda7290effb2fe936a54951db47d049adf71d6bd41b70c56dd9dedc8f3327c39?d=mp&s=160"},"body":"On Sun, Mar 22, 2009 at 4:00 PM, Sverre Rabbelier <srabbelier@gmail.com> wrote:\n> On Sun, Mar 22, 2009 at 23:08, Anthony Rasmussen <evoluenta@hotmail.com> wrote:\n>> Do I have to download the entire rep onto my laptop in order to do this?  I have read and read, but I am quite confused :)\n>\n> Yes, you do, in general though, git repositories are quite compact\n> compared to, say, a svn checkouts. It is not unheard of that the full\n> git clone is smaller than the same code as svn checkout.\n\nIt depends on what you mean by \"entire repo\". Of course you need all\nthe source files to compile, but you do not need past revisions. Take\na look at the --depth parameter for git-clone.\n\n-Geoffrey Lee\n"},{"id":"108953","messageId":"20090322231002.GA12974@vidovic","threadId":"18473","inReplyTo":"fabb9a1e0903221600j22cf028fl903aef8076e53777@mail.gmail.com","subject":"Re: Newbie: Do I need to download the entire repo to work on just 1 file?","fromName":"Nicolas Sebrecht","fromEmail":"nicolas.s-dev@laposte.net","sentAt":"2009-03-22T23:10:02Z","receivedAt":"2009-03-22T23:10:02Z","isPatch":false,"sender":{"key":"nicolas.s-dev@laposte.net","avatar":null},"body":"\nOn Mon, Mar 23, 2009 at 12:00:59AM +0100, Sverre Rabbelier wrote:\n> \n> Heya,\n> \n> On Sun, Mar 22, 2009 at 23:08, Anthony Rasmussen <evoluenta@hotmail.com> wrote:\n> > Do I have to download the entire rep onto my laptop in order to do this?  I have read and read, but I am quite confused :)\n\nPlease, wrap your lines to something convenient (72-80 characters max).\n\n> Yes, you do\n\nNo, you don't. Why not use the '--depth <depth>' option of 'git clone' ?\n\n-- \nNicolas Sebrecht\n"},{"id":"108954","messageId":"fabb9a1e0903221610p3b11f09ctc6a9f4d38b1bda3e@mail.gmail.com","threadId":"18473","inReplyTo":"20090322231002.GA12974@vidovic","subject":"Re: Newbie: Do I need to download the entire repo to work on just 1 file?","fromName":"Sverre Rabbelier","fromEmail":"srabbelier@gmail.com","sentAt":"2009-03-22T23:10:48Z","receivedAt":"2009-03-22T23:10:48Z","isPatch":false,"sender":{"key":"srabbelier@gmail.com","avatar":"https://avatars.githubusercontent.com/u/3098?v=4"},"body":"Heya,\n\nOn Mon, Mar 23, 2009 at 00:10, Nicolas Sebrecht\n<nicolas.s-dev@laposte.net> wrote:\n> No, you don't. Why not use the '--depth <depth>' option of 'git clone' ?\n\nThat depends on if he wants to push back to the original repo or not, right?\n\n-- \nCheers,\n\nSverre Rabbelier\n"},{"id":"108956","messageId":"83d7aaa40903221616x706fe579r9c8d3d792d2341e0@mail.gmail.com","threadId":"18473","inReplyTo":"fabb9a1e0903221610p3b11f09ctc6a9f4d38b1bda3e@mail.gmail.com","subject":"Re: Newbie: Do I need to download the entire repo to work on just 1 file?","fromName":"Geoffrey Lee","fromEmail":"geoffreyj.lee@gmail.com","sentAt":"2009-03-22T23:16:43Z","receivedAt":"2009-03-22T23:16:43Z","isPatch":false,"sender":{"key":"geoffreyj.lee@gmail.com","avatar":"https://gravatar.com/avatar/eda7290effb2fe936a54951db47d049adf71d6bd41b70c56dd9dedc8f3327c39?d=mp&s=160"},"body":"On Sun, Mar 22, 2009 at 4:10 PM, Sverre Rabbelier <srabbelier@gmail.com> wrote:\n> That depends on if he wants to push back to the original repo or not, right?\n\nCorrect. You cannot push, fetch, or clone a shallow repo. And for Git\ndevelopment, it's all about sending patches, so you don't need past\nrevisions.\n\n-Geoffrey Lee\n"},{"id":"108960","messageId":"20090322233120.GC12974@vidovic","threadId":"18473","inReplyTo":"fabb9a1e0903221610p3b11f09ctc6a9f4d38b1bda3e@mail.gmail.com","subject":"Re: Newbie: Do I need to download the entire repo to work on just 1 file?","fromName":"Nicolas Sebrecht","fromEmail":"nicolas.s-dev@laposte.net","sentAt":"2009-03-22T23:31:20Z","receivedAt":"2009-03-22T23:31:20Z","isPatch":false,"sender":{"key":"nicolas.s-dev@laposte.net","avatar":null},"body":"\nOn Mon, Mar 23, 2009 at 12:10:48AM +0100, Sverre Rabbelier wrote:\n> \n> Heya,\n> \n> On Mon, Mar 23, 2009 at 00:10, Nicolas Sebrecht\n> <nicolas.s-dev@laposte.net> wrote:\n> > No, you don't. Why not use the '--depth <depth>' option of 'git clone' ?\n> \n> That depends on if he wants to push back to the original repo or not, right?\n\nIt depends of what the OP means by \"entire repository\". You can't\n\"cherry-pick\" one single file without download the entire tree of the\nworking directory.\n\nYou can push with a truncated history. What you can't do is checkout\nfrom the history you don't have in your local repository.\n\n-- \nNicolas Sebrecht\n"},{"id":"108961","messageId":"20090322233608.GD12974@vidovic","threadId":"18473","inReplyTo":"20090322233120.GC12974@vidovic","subject":"Re: Newbie: Do I need to download the entire repo to work on just 1 file?","fromName":"Nicolas Sebrecht","fromEmail":"nicolas.s-dev@laposte.net","sentAt":"2009-03-22T23:36:08Z","receivedAt":"2009-03-22T23:36:08Z","isPatch":false,"sender":{"key":"nicolas.s-dev@laposte.net","avatar":null},"body":"\nOn Mon, Mar 23, 2009 at 12:31:20AM +0100, Nicolas Sebrecht wrote:\n\n> You can push with a truncated history. What you can't do is checkout\n> from the history you don't have in your local repository.\n\nI just told my biggest mistake today. It's time to go to the bed.\n\n-- \nNicolas Sebrecht\n"}]}