develooper Front page | perl.perl5.porters | Postings from November 2008

Re: git workflow (was Re: git?)

Thread Previous | Thread Next
From:
Rafael Garcia-Suarez
Date:
November 16, 2008 03:30
Subject:
Re: git workflow (was Re: git?)
Message ID:
b77c1dce0811160330k177db85et8b795b5bb3c96f64@mail.gmail.com
2008/11/16 Léon Brocard <acme@astray.com>:
> 2008/11/15 Craig A. Berry <craig.a.berry@gmail.com>:
>
>> Our cookbook needs to be "Meals in a Minute," not Julia Childs' "The Way
>> to Cook."
>
> I'm thinking of sections along the lines of:
>
> * I want to check out the latest version and look at history

git log, gitk, gitgui...

> * I want to check out the latest version, write a patch and send it to p5p

So what would be the preferred way to explain how to do this ?

I would go along the lines of:
* branch off the current master (git checkout -b mybranch)
* commit patches
* eventually, pull the master and rebase your branch on top of it
* use git format-patch to produce patch files
* send it with git-send-email, or if that doesn't work for you,
  with your favourite mailer

There are other ways to do it. This one seems simple and safe.

You can also commit directly to the master. But then origin/master and
master will be different, which can a/ confuse the beginner and b/
produce merge conflicts if the patch that has been sent is somewhat
modified by the pumpking.

> * I want to check out an old branch, write a patch and send it to p5p

Like the previous one, except that you would do "git checkout -b
maint-5.10" for example.

> * I want to check out the latest version and create a new branch for a
> few weeks, then write a big patch

I don't like this big patch approach. If you're working on a feature for
a few weeks, it's likely that you'll commit several patches instead.
And I don't see why sending a single simple patch shouldn't be done
that way either (see previous paragraphs)

> * I want to use github so that other people can follow my patches
>
> * I want to find out which commit broke this code
>
> ...
>
> * I'm a pumpkin
>
> So while we may skim the topics, we won't explain it all. Instead, we
> explain what to do.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About