-
Notifications
You must be signed in to change notification settings - Fork 284
Git workflow
We are pretty liberal in accepting contributions. You can either fork https://github.com/tpaviot/oce or ask on our mailing list for write access on our repository. The guidelines described in this page are meant to help everyone contributing. If you believe that they cause more harm than good, please feel free to discuss them.
No development is performed on the master
branch, this is an integration branch. Development happens on private branches, and when a developer thinks that her code is ready to merge into master
, she requests a merge.
Each developer can create her own branches under a private namespace. We usually choose a namespace based on our initials, but this naming is free as long as it is unambiguous. For instance, John Doe may decide to call his branches jd/fix-issue-13
or jd/mingw-port
.
The right part should be as explicit as possible, so that other developers may understand what this branch is about. If you intend to work on long-lived branch, it may also be worth writing a page on this wiki to give more details.
There is no restriction on private branches, developers can do what they want. These branches may be rebased against master
at any time without notice, this is why no branches should be based upon private branches of other people. Most of the time, branches are created from master
.
You may also create local branches on your harddisk without pushing them on github, these branches are then really private, but the main problem is that someone else may implement different changes without knowing of your work, and this will likely cause conflicts. Thus it is better to always push on github, even if it is unstable and must not be merged as is.
When a developer believes that her branch is ready to be merged into master, she first renames her branch by replacing her own prefix by review/
, logs into https://github.com/tpaviot/oce, switches to this new branch, and eventually performs a "Pull Request" by clicking on the top-right button. All OCE developers are then notified of this request, and will comment it. There are mostly three possibilities:
- Branch looks good and can be merged as is. Developers then usually write
+1
as a shorthand. - Branch looks good, but could be improved by slight changes. Comment is usually in the form
+1, but please rename variable foo into something more meaningful
. - Branch has problems and should not be merged. Then the request will be cancelled and you have to rename your branch to make it a private branch again.
Hopefully after a few days several developers have given their opinion and your branch will be processed. Of course, all developers are encouraged to review branches of other developers.