{"thread":{"id":"11704","subject":"Using email between 2 developers to keep git repositories in sync","startedAt":"2008-01-22T12:47:44Z","lastAt":"2008-01-22T22:59:02Z","messageCount":9,"participants":["ab_lists@mac.com","Johannes Schindelin","Jakub Narebski","Mark Levedahl","Daniel Barkalow","Annard Brouwer","Theodore Tso"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"66305","messageId":"7A02F7D1-9EB0-43AB-96F9-DDD71D4EF5FE@mac.com","threadId":"11704","inReplyTo":null,"subject":"Using email between 2 developers to keep git repositories in sync","fromName":"","fromEmail":"ab_lists@mac.com","sentAt":"2008-01-22T12:47:44Z","receivedAt":"2008-01-22T12:47:44Z","isPatch":false,"sender":{"key":"ab_lists@mac.com","avatar":null},"body":"Hello there,\n\nI have been converted to git after reading good things about it. I  \nhave been using it with a personal project and so I'm familiar with  \nthe basics.\nHowever I need to share code with a co-developer. He also has a code  \nbase that I need access to. For several reasons, a shared server will  \nnot work so I was thinking of using email to send patches back and  \nforth.\nMy question is related to the initial setup and sharing of our  \nrepositories. Would it be necessary for each of us to make a clone and  \nmake a tarball of that clone to send to one another before we can send  \npatches? The documentation is all based on using a git or ssh server  \nto set this up.\n\nThank you for any insights you can provide me!\nAnnard\n"},{"id":"66306","messageId":"alpine.LSU.1.00.0801221255530.5731@racer.site","threadId":"11704","inReplyTo":"7A02F7D1-9EB0-43AB-96F9-DDD71D4EF5FE@mac.com","subject":"Re: Using email between 2 developers to keep git repositories in sync","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2008-01-22T13:00:00Z","receivedAt":"2008-01-22T13:00:00Z","isPatch":false,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nOn Tue, 22 Jan 2008, ab_lists@mac.com wrote:\n\n> However I need to share code with a co-developer. He also has a code \n> base that I need access to. For several reasons, a shared server will \n> not work so I was thinking of using email to send patches back and \n> forth.\n\nMy recommendation: Use bundles.  Just make the initial \"clone\" like this:\n\n\t$ git bundle create initial.bundle --all\n\nSend the file \"initial.bundle\" (which you just created) to your \nco-developer.  He should now initialise his repository:\n\n\t$ mkdir my-new-workdir\n\t$ cd my-new-workdir\n\t$ git init\n\t$ git pull /path/to/initial.bundle master\n\n(Someone tried to get \"git clone /path/to/bundle\" to work, but I don't \nknow if that work was ever completed, so I assume it was not.)\n\nWhenever he wants to send you an update, he has to do something like this:\n\n\t$ git bundle create update.bundle --all --since=2.weeks.ago\n\nand send you the resulting file named \"update.bundle\".\n\nHth,\nDscho\n"},{"id":"66307","messageId":"m3k5m2klmh.fsf@roke.D-201","threadId":"11704","inReplyTo":"alpine.LSU.1.00.0801221255530.5731@racer.site","subject":"Re: Using email between 2 developers to keep git repositories in sync","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2008-01-22T13:53:32Z","receivedAt":"2008-01-22T13:53:32Z","isPatch":false,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Johannes Schindelin <Johannes.Schindelin@gmx.de> writes:\n\n> On Tue, 22 Jan 2008, ab_lists@mac.com wrote:\n> \n> > However I need to share code with a co-developer. He also has a code \n> > base that I need access to. For several reasons, a shared server will \n> > not work so I was thinking of using email to send patches back and \n> > forth.\n> \n> My recommendation: Use bundles.  Just make the initial \"clone\" like this:\n> \n> \t$ git bundle create initial.bundle --all\n> \n> Send the file \"initial.bundle\" (which you just created) to your \n> co-developer.  He should now initialise his repository:\n> \n> \t$ mkdir my-new-workdir\n> \t$ cd my-new-workdir\n> \t$ git init\n> \t$ git pull /path/to/initial.bundle master\n> \n> (Someone tried to get \"git clone /path/to/bundle\" to work, but I don't \n> know if that work was ever completed, so I assume it was not.)\n> \n> Whenever he wants to send you an update, he has to do something like this:\n> \n> \t$ git bundle create update.bundle --all --since=2.weeks.ago\n> \n> and send you the resulting file named \"update.bundle\".\n\nIf I remember correctly either in GitFaq or GitTios at GitWIki \n(http://git.or.cz/gitwiki/), or in \"Git in Nutshell\" guide there\nis description how to generate incremental bundle containing all\nobjects you created since last bundle and only those objects.\n\nBesides, after initial setup IMHO it is much better to exchange\npatches for review. Although usually there are more than two\ndevelopers in such case...\n\n-- \nJakub Narebski\nPoland\nShadeHawk on #git\n"},{"id":"66311","messageId":"30e4a070801220635q4978fd2fvc469ca00af4e11cc@mail.gmail.com","threadId":"11704","inReplyTo":"m3k5m2klmh.fsf@roke.D-201","subject":"Re: Using email between 2 developers to keep git repositories in sync","fromName":"Mark Levedahl","fromEmail":"mlevedahl@gmail.com","sentAt":"2008-01-22T14:35:12Z","receivedAt":"2008-01-22T14:35:12Z","isPatch":false,"sender":{"key":"mdl123@verizon.net","avatar":"https://avatars.githubusercontent.com/u/5302462?v=4"},"body":"On Jan 22, 2008 8:53 AM, Jakub Narebski <jnareb@gmail.com> wrote:\n>\n> Besides, after initial setup IMHO it is much better to exchange\n> patches for review. Although usually there are more than two\n> developers in such case...\n>\nBundles allow you to maintain identical history on two or more\ndisconnected servers, and this is a very distinct advantage over\npatches. Absent use of bundles to distribute the integrated changes,\nthe development history seen by both parties will diverge.\n\nMark\n"},{"id":"66312","messageId":"4F8D70B2-B264-46FF-BFBB-01AEF42DD888@mac.com","threadId":"11704","inReplyTo":"30e4a070801220635q4978fd2fvc469ca00af4e11cc@mail.gmail.com","subject":"Re: Using email between 2 developers to keep git repositories in sync","fromName":"","fromEmail":"ab_lists@mac.com","sentAt":"2008-01-22T15:05:24Z","receivedAt":"2008-01-22T15:05:24Z","isPatch":false,"sender":{"key":"ab_lists@mac.com","avatar":null},"body":"Thank you all for your feedback!\n\nSo would it be wise to synchronise the repositories over time using  \nthe bundles and despite having exchanged email patches or should they  \nbe used separately?\n\nThank you again!\nAnnard\n\nOn 22 Jan 2008, at 15:35, Mark Levedahl wrote:\n\n> On Jan 22, 2008 8:53 AM, Jakub Narebski <jnareb@gmail.com> wrote:\n>>\n>> Besides, after initial setup IMHO it is much better to exchange\n>> patches for review. Although usually there are more than two\n>> developers in such case...\n>>\n> Bundles allow you to maintain identical history on two or more\n> disconnected servers, and this is a very distinct advantage over\n> patches. Absent use of bundles to distribute the integrated changes,\n> the development history seen by both parties will diverge.\n>\n> Mark\n"},{"id":"66316","messageId":"30e4a070801220800l6f38bbe5wc6b1ceeac7efbf06@mail.gmail.com","threadId":"11704","inReplyTo":"4F8D70B2-B264-46FF-BFBB-01AEF42DD888@mac.com","subject":"Re: Using email between 2 developers to keep git repositories in sync","fromName":"Mark Levedahl","fromEmail":"mlevedahl@gmail.com","sentAt":"2008-01-22T16:00:34Z","receivedAt":"2008-01-22T16:00:34Z","isPatch":false,"sender":{"key":"mdl123@verizon.net","avatar":"https://avatars.githubusercontent.com/u/5302462?v=4"},"body":"On Jan 22, 2008 10:05 AM,  <ab_lists@mac.com> wrote:\n> Thank you all for your feedback!\n>\n> So would it be wise to synchronise the repositories over time using\n> the bundles and despite having exchanged email patches or should they\n> be used separately?\n>\nYou can use both: patches to distribute proposed changes, bundles to\ndistribute the integrated (and presumably controlled) branches after\nchanges are accepted. Of course, you can use a bundle to distribute a\nproposed change as well (as a topic branch), you have to decide for\nyourselves what works best. Patches are great for distributed review\nover a mailing list, but if only a couple of you and no mailing list\nthat advantage diminishes.\n\nMark\n"},{"id":"66332","messageId":"alpine.LNX.1.00.0801221713120.13593@iabervon.org","threadId":"11704","inReplyTo":"7A02F7D1-9EB0-43AB-96F9-DDD71D4EF5FE@mac.com","subject":"Re: Using email between 2 developers to keep git repositories in sync","fromName":"Daniel Barkalow","fromEmail":"barkalow@iabervon.org","sentAt":"2008-01-22T22:22:31Z","receivedAt":"2008-01-22T22:22:31Z","isPatch":false,"sender":{"key":"barkalow@iabervon.org","avatar":"https://avatars.githubusercontent.com/u/55364219?v=4"},"body":"On Tue, 22 Jan 2008, ab_lists@mac.com wrote:\n\n> Hello there,\n> \n> I have been converted to git after reading good things about it. I have been\n> using it with a personal project and so I'm familiar with the basics.\n> However I need to share code with a co-developer. He also has a code base that\n> I need access to. For several reasons, a shared server will not work so I was\n> thinking of using email to send patches back and forth.\n\nI think bundles or email or both is likely to be the correct solution, but \nyou should know that you don't need a shared server if you each have a \nserver the other can read from. Each of you sets up a public repository \nwith the same basic history, and you each have local clones of your public \nrepository, and you pull from the other into your local clone and \n(assuming you want to accept the other's changes) you do the merge and \npush to your own public server.\n\nIn fact, having a shared server is vaguely discouraged, since it means \nthere's a repository that's no single individual's responsibility; it's \njust that it's often the case that the existing social structure is based \non a group of co-maintainers of a single series.\n\n\t-Daniel\n*This .sig left intentionally blank*\n"},{"id":"66334","messageId":"2D91636D-197A-41C8-8BB3-D5002135BF99@mac.com","threadId":"11704","inReplyTo":"alpine.LNX.1.00.0801221713120.13593@iabervon.org","subject":"Re: Using email between 2 developers to keep git repositories in sync","fromName":"Annard Brouwer","fromEmail":"ab_lists@mac.com","sentAt":"2008-01-22T22:52:40Z","receivedAt":"2008-01-22T22:52:40Z","isPatch":false,"sender":{"key":"ab_lists@mac.com","avatar":null},"body":"Thank you all for your suggestions! The problem is that each of us  \nhaving a local server accessible to the other is not possible.  \nTherefore I will follow the path of sending patches by email and on  \nreleases we can synchronise using bundles. I think that's the best fit  \nfor our model of developing code semi-independently.\n\nCheers!\nAnnard\n\nOn 22 Jan 2008, at 23:22, Daniel Barkalow wrote:\n\n> I think bundles or email or both is likely to be the correct  \n> solution, but\n> you should know that you don't need a shared server if you each have a\n> server the other can read from. Each of you sets up a public  \n> repository\n> with the same basic history, and you each have local clones of your  \n> public\n> repository, and you pull from the other into your local clone and\n> (assuming you want to accept the other's changes) you do the merge and\n> push to your own public server.\n"},{"id":"66335","messageId":"20080122225902.GE1659@mit.edu","threadId":"11704","inReplyTo":"2D91636D-197A-41C8-8BB3-D5002135BF99@mac.com","subject":"Re: Using email between 2 developers to keep git repositories in sync","fromName":"Theodore Tso","fromEmail":"tytso@mit.edu","sentAt":"2008-01-22T22:59:02Z","receivedAt":"2008-01-22T22:59:02Z","isPatch":false,"sender":{"key":"tytso@mit.edu","avatar":"https://avatars.githubusercontent.com/u/51416?v=4"},"body":"On Tue, Jan 22, 2008 at 11:52:40PM +0100, Annard Brouwer wrote:\n> Thank you all for your suggestions! The problem is that each of us having a \n> local server accessible to the other is not possible. Therefore I will \n> follow the path of sending patches by email and on releases we can \n> synchronise using bundles. I think that's the best fit for our model of \n> developing code semi-independently.\n\nIs your project an open source one, or one where you don't mind the\nsource code being made public?  If so, another easier solution would\nbe to use a git hosting service, such as what is available at\nhttp://repo.or.cz.\n\nI'd also suggest synchronizing with bundles much more frequently than\nat release points.  The problem with sending patches back and forth is\nit's very easy to make a mistake, and also, as far as git is\nconcerned, each patch is a separate changeset applied in two places.\nSo it makes merging more challenging for git.  It can probably handle\nit, but makes life harder for everyone concerned.  So if you can use a\nsite like repo.or.cz, I'd highly recommend it.\n\n\t\t\t\t\t\t- Ted\n"}]}