Changes between Version 4 and Version 5 of GitCleanLocalHistory
- Timestamp:
- Jun 19, 2013, 11:41:34 AM (11 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
GitCleanLocalHistory
v4 v5 32 32 master 33 33 * feature_X_local 34 $ # create a temporary branch which HEADs to the last /patched/ commit (`C`) 34 35 $ # create a temporary branch ``_tmp'' which HEADs to the last /patched/ commit (`C`) 35 36 $ git checkout -b _tmp feature_X_local 36 $ git reset --hard C # see "C" node in the graph above 37 $ # move commits /from/ the common ancestor (ie C) between tmp_branch and feature_X_local (ie {D,E}) on top of feature_X 37 $ git reset --hard C 38 $ # ..see "C" node in the graph above 39 40 $ # move commits /from/ the common ancestor (ie C) between ``_tmp'' and ``feature_X_local'' (ie {D,E}) on top of ``feature_X'' 38 41 $ git rebase --onto feature_X _tmp feature_X_local 42 39 43 $ # cleaning 40 44 $ git branch -D _tmp