On 09/11/2014 09:20 AM, Nils Gladitz wrote: > Is there a trick to recreate the history in that order or > would I have to start from scratch?
First rewrite the branch to squash your updates back into the first commit, leaving all my CMP0054 warning commits later in the topic. Then start a new branch from the squashed commit containing only your part of the changes. Note the sha1 of this commit, say a01b2c3. Then edit it to *remove* the changes besides the refactoring and amend the commit. The result should be just one commit with the refactoring parts. Then you can use the "git commit-tree" plumbing to create a commit with the tree object of your original change but set its parent as the edited commit. This will manufacture a commit that makes the changes on top of the refactoring: commit=$(git commit-tree a01b2c3^{tree} -p HEAD) git merge $commit git commit --amend -C a01b2c3 Finally, rebase the rest of the topic back onto that. The tip of the resulting topic should look identical to what is on the stage now. Thanks, -Brad -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers