git-reparent
git-reparent copied to clipboard
How to reparent whole branch?
There are git-reparent-branch from depot_tools exist, but it can't reparent branches with entirely different history.
Now I'm using something
echo origin/board3_4_5_nru_ipbzona > /tmp/parent && git rev-list --reverse origin/ok-v2-ipb-c | xargs -n1 -i bash -c 'git checkout {} && echo $(git-reparent -p $(cat /tmp/parent) --no-reset --no-reset-committer) > /tmp/parent'
Please see "Reparenting an inner commit" in the README.