On May 18, 2012 4:43 AM, "Anssi Kääriäinen" <anssi.ka...@thl.fi> wrote:
>
> A heads up: I am working on Git and Github usage guidelines. There is
> a ticket https://code.djangoproject.com/ticket/18307, and I have a
> github branch with some initial work https://github.com/akaariai/django/tree/django_git_guidelines
> (or for changeset https://github.com/akaariai/django/compare/django_git_guidelines)
>
> The guidelines in short:
> - For trivial patches use pull requests directly
> - For non-trivial patches, create a trac ticket, announce your work
> by linking to your github branch, and when your work is ready to be
> pulled in, only then do a pull request
> - Aim for logically contained commits, commit messages of 50 char
> summary line, 72 char paragraphs thereafter.
> - When upstream has changed use git rebase instead of git pull
A rebase workflow has always been problematic, in my experience. It will cause previously published commits to be rewritten, changing their hashes, and invalidating other branches, forks, or installations depending on them.
I also think rebasing can seriously devalue the history of a branch, by eradicating the context in which changes had been made.
Even the got developers will recommend not rebasing public commits. I think we should follow that advice.
> - When you do additional fixes to your work, use git rebase -i so
> that your work still fullfills the logical commits requirement.
>
> Lots of more details in the WIP branch. All feedback welcomed. Lets
> keep the discussion of any high-level issues here on django-
> developers, as the choices made impact the whole community.
>
> The biggest issue is how we aim to use the pull requests. My take on
> this is that pull requests should be only used for work ready for
> committer. That is, the original author feels the work is ready, or he
> doesn't know how to do anything more. If the pull requests are used
> for feature requests or work-in-progress patches we risk having lots
> of open tickets and lots of open pull requests.
>
> I have tried to gather pieces of wisdom around the net. I am not too
> experienced with Git, so if you have experience with the above
> mentioned and/or other Git workflows feedback is appreciated.
>
> - Anssi
>
> --
> You received this message because you are subscribed to the Google Groups "Django developers" group.
> To post to this group, send email to django-d...@googlegroups.com.
> To unsubscribe from this group, send email to django-develop...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/django-developers?hl=en.
>
Hi Anssi,Thanks for working on git usage guidelines! I very much agree that apull request should only be created when the contributor considers thebranch finished and ready for review and merge (for instance, thereshould never be a pull request created without the necessary docs andtests). Having lots of half-finished pull requests in the queue is aburden on everyone.
- Anssi
I am +1 on merge --squash. The reason is that there is tremendousvalue to having a mostly linear mainline development branch,especially for one so widely depended on as Django's. My feeling isthat we should aim to have the official branches consist of only thosecommits that we would feel comfortable checking out and developingwith. It is much nicer to run "git log" and see a series of focusedbug fix patches than it is to see a tangle of "Fix the reticulatingsplines by frobbing the axis" "Oops, the axis was already fixed,revert that commit" "Do the real work in hobnob.py".In addition to making automated git bisects possible, it also lowersthe bar for contributions: so long as the code changes in a pullrequest are sound, we can accept fragmented histories and badlyformatted commit messages and put the onus on the committers to cleanup commit messages for posterity.