This is important because with more and more developers, you run into more issues with making sure your code applies cleanly or can be easily merged.
Changes you submit may be rendered obsolete or severely broken by work that is merged in while you were working or while your changes were waiting to be approved or applied.
“Private,” in this context, means closed-source — not accessible to the outside world.
As a general rule, your messages should start with a single line that’s no more than about 50 characters and that describes the changeset concisely, followed by a blank line, followed by a more detailed explanation.
The Git project requires that the more detailed explanation include your motivation for the change and contrast its implementation with previous behavior — this is a good guideline to follow.
In this environment, you can follow a workflow similar to what you might do when using Subversion or another centralized system.
You still get the advantages of things like offline committing and vastly simpler branching and merging, but the workflow can be very similar; the main difference is that merges happen client-side rather than on the server at commit time.
Having a good guideline for creating commits and sticking to it makes working with Git and collaborating with others a lot easier.
The Git project provides a document that lays out a number of good tips for creating commits from which to submit patches — you can read it in the Git source code in the Next, try to make each commit a logically separate changeset.
If some of the changes modify the same file, try to use to partially stage files (covered in detail in Interactive Staging).
The project snapshot at the tip of the branch is identical whether you do one commit or five, as long as all the changes are added at some point, so try to make things easier on your fellow developers when they have to review your changes.
(The protocol messages have been replaced with # John's Machine $ git clone [email protected]:Cloning into 'simplegit'... $ cd simplegit/ $ vim lib/$ git commit -am 'remove invalid default value' [master 738ee87] remove invalid default value 1 files changed, 1 insertions( ), 1 deletions(-)# Jessica's Machine $ git clone [email protected]:Cloning into 'simplegit'... $ cd simplegit/ $ vim TODO $ git commit -am 'add reset task' [master fbff5bc] add reset task 1 files changed, 1 insertions( ), 0 deletions(-) is the name of the remote reference being updated.