In the KIELER project we use Git. We like Git. We want to get the maximum out of Git. We want branches, many branches.
Yes, branches! This shows the KIELER branching scheme. If you want to know whatever the different classes of branches do, check Source Code Management.
Why and how to use branches
Now you should now which use the different kinds of branches have, if not, go back to Source Code Management.
Ok, now nearly everything should be clear. We want to implement everything in features. The master branch should always be release-ready. For developers this means:
- Break down development into small features. Implement large Features incrementally in smaller Features
- Make a feature branch for each feature you develop
- Regularly merge changes from the master branch into your feature branch
- Keep track of your development tasks in Jira, it helps others to know what you are working on
When is my feature considered as done?
So you took heed to the branching guidelines. There is a little more, you do not know yet when your feature is ready to be merged back into the master branch:
- All planned functionality must be implemented and working
- Push your branch to the mainline so that Bamboo can build it
- The code has to be well commented; especially Javadoc comments have to be complete
- The code must not contain any warnings, including FindBugs and Checkstyle warnings. If single warnings cannot be avoided, leave a comment in the source
- The code should be well covered by unit tests
- The code should have been reviewed
But my feature is sooooo tiny, do I always have to open a new branch?
Well, at least you should. If your feature is really small it is ok to push it directly to master. Remember, do not break the build!