Dropping squashing commits from contribution process

- Rephrases squashing of commits before submitting from a requirement to a recommendation
 - minor fixes around that
This commit is contained in:
Benjamin Kampmann 2014-02-28 18:08:06 +01:00
parent 67463af4f4
commit ecf8078fde

View File

@ -37,6 +37,8 @@ Anyone wishing to contribute to the **[Discourse/Discourse](https://github.com/d
cd discourse cd discourse
git checkout -b new_discourse_branch git checkout -b new_discourse_branch
> Please keep your code clean: one feature or bug-fix per branch. If you find another bug, you want to fix while being in a new branch, please fix it in a separated branch instead.
3. Code 3. Code
* Adhere to common conventions you see in the existing code * Adhere to common conventions you see in the existing code
* Include tests, and ensure they pass * Include tests, and ensure they pass
@ -56,26 +58,7 @@ Anyone wishing to contribute to the **[Discourse/Discourse](https://github.com/d
5. Commit 5. Commit
First, ensure that if you have several commits, they are **squashed into a single commit**: For every commit please write a short (max 72 characters) summary in the first line followed with a blank line and then more detailed descriptions of the change. Use markdown syntax for simple styling.
```
git remote add upstream https://github.com/discourse/discourse.git
git fetch upstream
git checkout new_discourse_branch
git rebase upstream/master
git rebase -i
< Choose 'squash' for all of your commits except the first one. >
< Edit the commit message to make sense, and describe all your changes. >
git push origin new_discourse_branch -f
```
Now you're ready to commit:
```
git commit -a
```
**NEVER leave the commit message blank!** Provide a detailed, clear, and complete description of your commit! **NEVER leave the commit message blank!** Provide a detailed, clear, and complete description of your commit!
@ -83,8 +66,8 @@ Anyone wishing to contribute to the **[Discourse/Discourse](https://github.com/d
6. Update your branch 6. Update your branch
``` ```
git checkout master git fetch origin
git pull --rebase git rebase origin/master
``` ```
7. Fork 7. Fork
@ -101,6 +84,21 @@ Anyone wishing to contribute to the **[Discourse/Discourse](https://github.com/d
9. Issue a Pull Request 9. Issue a Pull Request
Before submitting a pull-request, clean up the history, go over your commits and squash together minor changes and fixes into the corresponding commits. You can squash commits with the interactive rebase command:
```
git fetch origin
git checkout new_discourse_branch
git rebase origin/master
git rebase -i
< the editor opens and allows you to change the commit history >
< follow the instructions on the bottom of the editor >
git push -f mine new_discourse_branch
```
In order to make a pull request, In order to make a pull request,
* Navigate to the Discourse repository you just pushed to (e.g. https://github.com/your-user-name/discourse) * Navigate to the Discourse repository you just pushed to (e.g. https://github.com/your-user-name/discourse)
* Click "Pull Request". * Click "Pull Request".
@ -117,4 +115,6 @@ Anyone wishing to contribute to the **[Discourse/Discourse](https://github.com/d
The Discourse team may recommend adjustments to your code. Part of interacting with a healthy open-source community requires you to be open to learning new techniques and strategies; *don't get discouraged!* Remember: if the Discourse team suggest changes to your code, **they care enough about your work that they want to include it**, and hope that you can assist by implementing those revisions on your own. The Discourse team may recommend adjustments to your code. Part of interacting with a healthy open-source community requires you to be open to learning new techniques and strategies; *don't get discouraged!* Remember: if the Discourse team suggest changes to your code, **they care enough about your work that they want to include it**, and hope that you can assist by implementing those revisions on your own.
> Though we ask you to clean your history and squash commit before submitting a pull-request, please do not change any commits you've submitted already (as other work might be build on top).
[m]: http://meta.discourse.org [m]: http://meta.discourse.org