diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-11-22 12:06:07 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-11-22 13:30:11 +0000 |
commit | 631b35e7dbe23b371febac7d5a13947c81553734 (patch) | |
tree | a98a01ea8f92d537ab972ebccb7b967637f187b7 /CONTRIBUTING.md | |
parent | Merge pull request #2783 (diff) | |
download | monero-631b35e7dbe23b371febac7d5a13947c81553734.tar.xz |
CONTRIBUTING.md: mention git add -p as a way to avoid spurious changes
Diffstat (limited to 'CONTRIBUTING.md')
-rw-r--r-- | CONTRIBUTING.md | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 86eb45191..72571920a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -25,6 +25,17 @@ modifying is encourgaged. Proper squashing should be done (eg, if you're making a buggy patch, then a later patch to fix the bug, both patches should be merged). +If you've made random unrelated changes (either because your editor +is annoying or you made them for other reasons), you can select +what changes go into the coming commit using git add -p, which +walks you through all the changes and asks whether or not to +include this particular change. This helps create clean patches +without any irrelevant changes. git diff will show you the changes +in your tree. git diff --cached will show what is currently staged +for commit. As you add hunks with git add -p, those hunks will +"move" from the git diff output to the git diff --cached output, +so you can see clearly what your commit is going to look like. + ## Commits and Pull Requests Commit messages should be sensible. That means a subject line that |