Changes between Version 39 and Version 40 of DeveloperGuidelines/Git


Ignore:
Timestamp:
04/12/12 19:01:53 (10 years ago)
Author:
Fran Boon
Comment:

Squashing Commits

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperGuidelines/Git

    v39 v40  
    4444* https://github.com/mygitusername/eden/pull/new/master
    4545
    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 ====
     47If 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
     49This isn't directly possible once your code is Pushed.
     50
     51Option 1:
     52{{{
     53git stash
     54git checkout -b newbranch
     55# Add an extra tilde per commit to squash (this assumes 2 commits)
     56git reset HEAD~~
     57git commit -am 'Sqashed!'
     58}}}
     59
     60Option2: [[BR]]
     61Create a patch & apply this to a clean clone.
    4862=== Resolving Merge Conflicts ===
    4963If you encounter conflicts during the rebase, the conflicts will be tagged in the files with: