Tips for Distributed Development
You can help avoid merge conflicts and nasty, nasty bugs by adhering to the following recommendations:
-
Submit all relevant changes to the upstream project with a patching workflow.
-
Keep patches small. Massive formatting changes will quickly wreck a project's merge-ability. Review your changes with
git diff --patch …. If you don't absolutely need to touch that line of code, leave it alone. -
Keep topics isolated. If your changes do two separate things that do not depend on one another, consider splitting them into two separate feature branches. This allows the maintainer to merge what is ready and to iterate on the rest.
-
Start your topic branches from the right place. If your site is the maintainer, topic branches should probably start from
origin/developororigin/master. If your site is the fork, topic branches should probably start fromupstream/developorupstream/master. -
Exchange bundles as frequently as possible. More frequent integration is much easier to do: there is less to merge at once, and everyone remembers what they've been doing.
-
Talk about the changes you plan to make, especially if they are big or breaking.
-
Test ferociously until there is nothing left to test. Write simple test-cases and automate their execution.