I had something that looks like this
6---7 (currentBranch) / 3---4---5---8 (initialBranch) / 1---2 (master) I squash merged initialBranch into master, so now master looks something like
1---2---9 where commit '9' is commits 3+4+5+8 squashed together My ultimate goal is to rebase currentBranch in the remote repo to look something like
6---7 (currentBranch) / 1---2---9 What are the series of commands I need to run to accomplish this?
git checkuot currentBranch; git rebase -i 9and drop all commits that were both squashed and remain parent of the commit #6 from the TODO list (#3, #4, #5): the TODO file will contain something like "pick 6 \n pick 7". This should work and may result in a conflict if the commit #8 brings something that cannot be automatically merged.git checkout currentBranch; git rebase --onto 9 7~2 currentBranch(but I'm not sure if it works as expected).