Changes between Version 7 and Version 8 of github


Ignore:
Timestamp:
10/21/13 11:28:31 (10 years ago)
Author:
admin
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • github

    v7 v8  
    7878=== apply a patch an make it uncommitted ===
    7979On the receiving side apply the patch as described above and the reset to the last commit before the patch using the "git reset --mixed <Hash of the commit before the temporary commit>" again
     80
     81== Squashing several commits into one ==
     82After cherry-picking serveral commits into one new clean base one can consolidate the commits into one using the following commands:
     83
     84In the following example i have been working on the cm-10.2 branch and now want to consolidate all my last commits into one. The result should be in the cm-10.2 branch again.
     85
     86Move the current branch
     87{{{
     88git branch -m cm-10.2 cm-10.2_pff
     89}}}
     90Checkout the original branch again and merge the working branch.
     91{{{
     92git checkout -b cm-10.2 origin/cm-10.2
     93git merge cm-10.2_pff
     94}}}
     95Reset the cm-10.2 branch to the original state.
     96{{{
     97git reset origin/cm-10.2
     98}}}
     99Now all the changes are unstaged and one can add and commit them again in one consolidated commit.
     100{{{
     101git add -A
     102git commit
     103}}}