git - Artificially make one commit point to another one after manual merge? -
i in such git state:
after git checkout outer:
* 2df9c6b (head -> outer) ready merging * 161c98f working on new stuff.. * faec47b welcome branch `outer` * d2166d0 last common commit ... after git checkout master:
* 82c6303 (head -> master) go on doing stuff * d2166d0 last common commit * ... after having run git merge outer no conflicts, came out like:
* 6ebd696 (head -> master) merge branch 'outer' master |\ | * 2df9c6b (outer) ready merging * | 82c6303 go on doing stuff | * 161c98f working on new stuff.. | * faec47b welcome branch `outer` |/ * d2166d0 last common commit ... however. automatic merge turned out not wanted have. ran git reset 82c6303 --hard start on with:
git merge outer --no-commit ... fixing stuff, merging on own .. git add * git commit -m "merged branch 'outer' master" what have is:
* 3d1250b (head -> master) merge branch 'outer' master * 82c6303 go on doing stuff * d2166d0 last common commit * ... which is: commit 3d1250b wanted be, not point 2df9c6b anymore. how can make point 2df9c6b in order make clear happened? mean anything?
so unless did funky between git merge outer --no-commit , git commit -m "merged branch 'outer' master", have no idea why commit not recorded merge commit (i.e. why doesn't have 2 parents). but, assuming 3d1250b contains snapshot after merge, following make "empty" commit points 3d1250b , 2df9c6b, "correct" history: git merge outer --strategy ours.
Comments
Post a Comment