46 | | |
47 | | If you didn't squash your commits, you may be asked to do so. This isn't directly possible once your code is Pushed, so instead you should create a patch & apply this to a clean cloen so that the pull request contains a single commit which is easy to review & applies cleanly. |
| 46 | ==== Squashing Commits ==== |
| 47 | If you didn't squash your commits before submitting the Pull Request, you may be asked to do so so that the pull request contains a single commit which is easy to review & applies cleanly. |
| 48 | |
| 49 | This isn't directly possible once your code is Pushed. |
| 50 | |
| 51 | Option 1: |
| 52 | {{{ |
| 53 | git stash |
| 54 | git checkout -b newbranch |
| 55 | # Add an extra tilde per commit to squash (this assumes 2 commits) |
| 56 | git reset HEAD~~ |
| 57 | git commit -am 'Sqashed!' |
| 58 | }}} |
| 59 | |
| 60 | Option2: [[BR]] |
| 61 | Create a patch & apply this to a clean clone. |