To move a range of commits in Git so they are based on a different commit:
git rebase --onto new-base current-base latest-commit
new-base
: This is the commit you want to move the range to. This commit will be the new parent of the commits you're moving.current-base
: This is the commit that your range is currently based on. It is not the first commit in the range, but the parent of the first commit.latest-commit
: This is the tip, the most recent commit in your commit range.