To be able to cleanly integrate your work with the other developers, never commit on the master branch (see Production workflow for a complete discussion and Forking tutorial for a cookbook example). In short, leave master only for changes you fetch, or pull from the official repository (see Synchronizing).
In the Gnuastro commit messages, we strive to follow these standards. Note that in the early phases of Gnuastro’s development, we are experimenting and so if you notice earlier commits don’t satisfy some of the guidelines below, it is because they predate that guideline.
The commits have to start with one short descriptive title. The title is
separated from the body with one blank line. Run
git log to see
some of the most recent commit messages as an example. In general, the
title should satisfy the following conditions:
git log --oneline, and also branch names or the graph structure outputs of
git logwhich are also commonly used.
The body of the commit message is separated from the title by one empty
line. Recall that anyone who has subscribed to
mailing list will get the commit in their email after it has been pushed to
master. People will also read them when they synchronize with the
main Gnuastro repository (see Synchronizing). Finally, the commit
messages will later be used to update the NEWS file on each
release. Therefore the commit message body plays a very important role in
the development of Gnuastro, so please adhere to the following guidelines.
git logoutput can be cleanly displayed (note that the commit message is indented in the output of
git log). If you use Emacs, Gnuastro’s .dir-locals.el file will ensure that your commits satisfy this condition (using M-q).
bug/task #ID, note the space) in the commit message (from Gnuastro project webpage) for interested people to be able to followup the discussion that took place there. If the commit fixes a bug or finishes a task, the recommended way is to add a line after the body with ‘
This fixes bug #ID.’, or ‘
This finishes task #ID.’. Don’t assume that the reader has internet access to check the bug’s full description when reading the commit message, so give a short introduction too.