git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* parallel dev. with email
@ 2009-03-03 15:31 stoecher
  2009-03-03 17:20 ` Marcel M. Cary
  2009-03-03 19:35 ` Peter Baumann
  0 siblings, 2 replies; 3+ messages in thread
From: stoecher @ 2009-03-03 15:31 UTC (permalink / raw)
  To: git

Hi,

I am new to git and I am wondering what git commands to use for this szenario: two developers without the possibility of sharing a server communicate their changes via email.

This is how far I have come reading the online docu:
* Each developer can create the diff-info of his commits with
  git format-patch
* and the other developer can incorporate these changes with
  git am

After creating the patches with format-patch one could set a tag:
  git tag -f patchesDone
so next time one wants to create patches, this tag can be used as the starting point:
  git format-patch patchesDone..

But what if in the meantime one has incorporated the other developer's changes with git am? Then these changes will also be among the patches created with format-patch. What will happen, if these patches are sent to the other developer, who does not need his own changes again. Will his own changes be silently ignored by git am? Or how else to effectively coordinate the work of two developers with git via email?

thank you,

Wolfgang
-- 
Computer Bild Tarifsieger! GMX FreeDSL - Telefonanschluss + DSL
für nur 17,95 ¿/mtl.!* http://dsl.gmx.de/?ac=OM.AD.PD003K11308T4569a

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: parallel dev. with email
  2009-03-03 15:31 parallel dev. with email stoecher
@ 2009-03-03 17:20 ` Marcel M. Cary
  2009-03-03 19:35 ` Peter Baumann
  1 sibling, 0 replies; 3+ messages in thread
From: Marcel M. Cary @ 2009-03-03 17:20 UTC (permalink / raw)
  To: stoecher@gmx.at; +Cc: git@vger.kernel.org

stoecher@gmx.at wrote:
> Hi,
> 
> I am new to git and I am wondering what git commands to use for 
 > this szenario: two developers without the possibility of sharing
 > a server communicate their changes via email.
 >
> This is how far I have come reading the online docu:
> * Each developer can create the diff-info of his commits with
>   git format-patch
> * and the other developer can incorporate these changes with
>   git am
> 
> After creating the patches with format-patch one could set a tag:
>   git tag -f patchesDone
> so next time one wants to create patches, this tag can be used as the starting point:
>   git format-patch patchesDone..

I wonder if it would be easier to maintain a separate branch containing 
changes which you have both integrated.  Suppose you call it "master". 
And then do your own work on another branch called "private".  Then when 
you want to send all your new work, you can just do:

   git format-patch master..private

possibly threading the messages, etc.

When your collaborator has acknowledged receipt of the patches, you put 
them on your master also, and rebase your "private" branch.  If the 
patch doesn't apply cleanly for your collaborator, you'd need to apply 
your collaborator's resolution to your master instead of your original 
patch.  Or you could apply whatever work your collaborator has that is 
conflicting with your own patch, and resolve the conflict yourself.

I would expect you can periodically verify that your "master" source 
code is synchronized by comparing tree hashes, even though the commit 
hashes may differ.

I imagine you might find that your patches might sometimes have a 
different order than your collaborator's if your emails cross, and their 
commit hashes may differ.  But I expect that would mostly work out ok. 
You could probably verify that your "master" source code is synchronized 
by comparing tree hashes from time to time, even though the commit 
hashes may differ.

You could even split your work among several "feature branches".  But 
one piece of information that "git format-patch" does not advertise, but 
which "git push" does, is the branch that a patch should be applied to. 
  So if your protocol is email-only, and you want to share many branches 
with your collaborator, you'd have to communicate that explicity in the 
email.

> But what if in the meantime one has incorporated the other 
 > developer's changes with git am? Then these changes will also
 > be among the patches created with format-patch. What will
 > happen, if these patches are sent to the other developer,
> who does not need his own changes again. Will his own changes 
 > be silently ignored by git am?

Yes, provided the actual code changes in the duplicate patch are exactly 
the same, git am will skip it, even if the committer, timestamps, or 
comment are slightly different.

Marcel

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: parallel dev. with email
  2009-03-03 15:31 parallel dev. with email stoecher
  2009-03-03 17:20 ` Marcel M. Cary
@ 2009-03-03 19:35 ` Peter Baumann
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Baumann @ 2009-03-03 19:35 UTC (permalink / raw)
  To: stoecher; +Cc: git

On Tue, Mar 03, 2009 at 04:31:41PM +0100, stoecher@gmx.at wrote:
> Hi,
> 
> I am new to git and I am wondering what git commands to use for this szenario: two developers without the possibility of sharing a server communicate their changes via email.
> 
> This is how far I have come reading the online docu:
> * Each developer can create the diff-info of his commits with
>   git format-patch
> * and the other developer can incorporate these changes with
>   git am
> 
> After creating the patches with format-patch one could set a tag:
>   git tag -f patchesDone
> so next time one wants to create patches, this tag can be used as the starting point:
>   git format-patch patchesDone..
> 
> But what if in the meantime one has incorporated the other developer's changes with git am? Then these changes will also be among the patches created with format-patch. What will happen, if these patches are sent to the other developer, who does not need his own changes again. Will his own changes be silently ignored by git am? Or how else to effectively coordinate the work of two developers with git via email?
> 
> thank you,
> 
> Wolfgang

[ Disclaimer: It was a *very* long time since I used this; there might
  be a better way to use bundles already ]

You could also use 'git bundle' to send your changes.  E.g. if you have
all your already released/send patches in master branch and all your
locale changes in private

 $ git bundle create mybundle private ^master  	# not sure if private..master
						# will work here


and your friend could to

 $ git bundle verify mybundle
 $ git fetch mybundle master:localRef

to import the changes. (Pls have a look in the manpage of git bundle,
there are many examples)

-Peter

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-03-03 19:35 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-03 15:31 parallel dev. with email stoecher
2009-03-03 17:20 ` Marcel M. Cary
2009-03-03 19:35 ` Peter Baumann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).