-
Notifications
You must be signed in to change notification settings - Fork 73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add documentation on how to prepare commits #701
Conversation
doc/commits.rst
Outdated
For instance, do not mix cosmetical changes with other, more relevant ones. | ||
|
||
- Commit frequently and in an incremental manner. | ||
Do not be afraid of making too many commits, they can be merged afterwards. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Careful, "merge" has a very specific meaning in git, and not the one you are trying to convey here: "squash".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup, you are right. I was actually thinking that maybe it would be more descriptive for people that are not familiar with git, but it cannot be used like this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand completely where you're coming from. How about: "they can be combined afterwards. (This is known as squashing in git.)"?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, that's nice.
25caee2
to
a7d11eb
Compare
c9bcf77
to
1b831b6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR adds a best practice guideline on how and when to commit. Hopefully the developers will follow it, which would not only make the history cleaner but also immensely ease the review process. Thanks for taking time to make this document!
1b831b6
to
8d2c931
Compare
This is a first attempt in documenting how to make a good commit, building on what's already described in
contributing.rst
and making it a bit more specific.I intend to update this PR with some common practices that don't follow these guidelines to make a clearer picture.