On May 18, 11:43 am, Anssi Kääriäinen <anssi.kaariai...@thl.fi> wrote: > A heads up: I am working on Git and Github usage guidelines. There is > a tickethttps://code.djangoproject.com/ticket/18307, and I have a > github branch with some initial > workhttps://github.com/akaariai/django/tree/django_git_guidelines > (or for > changesethttps://github.com/akaariai/django/compare/django_git_guidelines)
While looking at the pull requests the biggest obstacle to pulling the changes in seems to be the commit messages, or having multiple commits where there should be only one. The second issue can be resolved with git rebase -i. For the first issue, here are the commit guidelines. Message format is: """ Fixed #nnnnn -- Made sure foo does bar consistently The summary line (the line above) should be less than 50 chars. It should be prefixed with "Fixed #nnnnn -- " where #nnnnn is the Trac ticket number. If the commit just references some ticket, use Refs #nnnnn in the message body. If the commit targets some other branch than the master branch, it should be prefixed with the branch name ([1.4.x] for example). So, the above would be: [1.4.x] Fixed #nnnnn -- Made sure foo does bar consistently The message body should be composed of lines no longer than 72 chars each. Each paragraph should be separated from each other by a newline. The line length restrictions aren't hard ones. In particular, the summary line will often be longer than 50 chars, as the prefix part can be almost half of the 50 chars already. """ More details in the message is better than less. The commit message should be in past tense. It might be we need to revisit the summary line format (24 chars used for just the prefix part above). Also, the tense format can be a little annoying as git doesn't use that for its revert and merge messages. Still, at this point aim to use the above format. If you do, you give committers a chance to directly merge your commits, which makes merging the trivial patches much easier. In the pull requests you should mention if you have ran any tests. Having "passes all tests on sqlite3" is a good signal for a committer. Always remember to mention if you think there is still some work to be done. You can edit the already published commit message with (git rebase -i if you have multiple commits to squash or edit) or git commit --amend. When finished, push the work to your topic branch with git push -f origin topic_branch. Note that you should use the commit --amend and push -f only if you do not intend others to base work on the topic_branch. - 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-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.