Many core developers and the GSOC folks use GitHub for Django development, so I hope discussing the best practices is appropriate for django-dev.
Let me outline the desired workflow, please amend and correct as you see fit as there are probably errors or omissions. I expect various useful patterns and workarounds for problems have emerged which could be shared with the larger community. I'll create a proper guide in the wiki once feedback has been collected. Assumptions ----------- You want to work on several fixes and features (tasks) and * keep the changes for a particular task selt-contained in a branch, * frequently update the codebase with upstream changes, * have a has-it-all branch for testing out how the different task branches interact. You have created a fork of django/django on GitHub, `git clone`d the work to local machine, added the upstream repository with `git remote add upstream`. Working on a task ----------------- Goal: keep the changes self-contained, create and update patches suitable for attaching to tickets in Django trac. # branch from master $ git checkout -b ticket1234 master $ ... change files, commit often ... $ ... run tests ... # create the remote branch and push changes into it $ git push origin ticket1234 # create a patch, attach it to a relevant ticket in trac $ git diff master > ticket1234.patch After upstream has changed -------------------------- Goal: bring in the changes in upstream to a task. # pull in upstream changes $ git pull upstream master $ git checkout ticket1234 # merge, fix any conflicts $ git merge master # push changes to GitHub, remote branch assumed to exist $ git push # update the patch $ git diff master > ticket1234.patch Testing everything in the has-it-all branch ------------------------------------------- Goal: a place to try out the code from all tasks together. 'master' can not be used for this as it is used for tracking upstream. This is a temporary branch that can be removed after testing is done. $ git checkout -b has-it-all master $ git merge ticket1234 $ git merge ticket1235 $ ... run tests ... # delete the branch $ git checkout master $ git branch -d has-it-all ------------ This is just a (untested) skeleton. All help in improving it, adding caveats and tricks most welcome. Best, Mart Sõmermaa --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to django-developers@googlegroups.com To unsubscribe from this group, send email to django-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---