Repository navigation
Git workflow
We want to version our project in a structured and organized way to support a good collaboration between all developers on this project. Please be mindful of these rules and adhere to them as close as possible.
Please mind the branch naming conventions. We will use the concept of feature branches:
-
master The masterbranch is used only for releases. So every time we push to the masterbranch that is a new version of our product. Such a release should be tagged accordingly: x.y.z (e.g.: 1.5.3) where
- x is a major release that might not be backwards compatible and introduce new features
- y is a minor release that introduces new features, but is backwards compatible
- z is a small release that most often contain bug fixes etc.
- dev The dev branch is used for development, where all changes are merged and thoroughly tested. Releases are prepared on this branch to be later pushed to the master branch. All feature branches are based on the dev branch.
-
feature-branch Feature branches are used to develop a specific feature. They are always based on the dev branch. When a feature is ready it should be thoroughly tested on the feature branch and then merged into the development branch and tested there again.
- to update a feauter branch to a newer dev branch commit use git rebase`
- to push the changes to the dev branch use git merge`
Commits are a very important part of a versioning system. To make the commits useful and meaningful it is critical to give them a proper massage.
A good commit message contains a short summary of the changes in the first line and if necessary a more detailed description starting at line 3. You can think of the first line as an answer to the question: "What does this commit changes when I apply it?"
All commit messages are written in simple present.
Here is an example (Not every commit has to be this long.):
Summarize changes in around 50 characters or less
More detailed explanatory text, if necessary. Wrap it to about 72
characters or so. In some contexts, the first line is treated as the
subject of the commit and the rest of the text as the body. The
blank line separating the summary from the body is critical (unless
you omit the body entirely); various tools like `log`, `shortlog`
and `rebase` can get confused if you run the two together.
Explain the problem that this commit is solving. Focus on why you
are making this change as opposed to how (the code explains that).
Are there side effects or other unintuitive consequences of this
change? Here's the place to explain them.
Further paragraphs come after blank lines.
- Bullet points are okay, too
- Typically a hyphen or asterisk is used for the bullet, preceded
by a single space, with blank lines in between, but conventions
vary here
If you use an issue tracker, put references to them at the bottom,
like this:
Resolves: #123
See also: #456, #789
This example is written by Chris Beams. Find the article here: https://chris.beams.io/posts/git-commit/#intro