Changes between Version 55 and Version 56 of DeveloperGuidelines/Git


Ignore:
Timestamp:
05/18/12 15:18:28 (13 years ago)
Author:
Fran Boon
Comment:

Separate out the 'rebase post-facto'

Legend:

Unmodified
Added
Removed
Modified
  • DeveloperGuidelines/Git

    v55 v56  
    122122}}}
    123123
    124 === Resetting to a previous commit ===
     124==== Rebasing after pushing to GitHub ====
     125Squash your commits if they are not in between two executions of git pull or git merge is:
     126{{{
     127# Stash your current work
     128git stash
     129# N = number of commits to squash
     130git reset HEAD@{N}
     131git commit -am 'Your commit message for the one-big-commit'
     132# Push to your branch on GitHub, overwriting any previous code there
     133git push origin +master
     134# Restore your work in-progress
     135git stash pop
     136}}}
     137
     138
     139
     140==== Resetting to a previous commit ====
    125141There are two types of resets soft and hard.
    126142A soft reset is done like this:
     
    142158# Force update of GitHub
    143159git push origin +master
    144 }}}
    145 
    146 One more method to squash your commits if they are not in between two executions of git pull or git merge is:
    147 {{{
    148 git stash
    149 git reset HEAD@{N}
    150 git commit -am 'Your commit message for the one-big-commit'
    151 git push
    152 git stash pop
    153160}}}
    154161