I have created a testing branch. It has a lot of tiny commits to build one feature. At the end of it, I want to take the final completed changes, and put them into the maste
Various approaches are described in "Understanding the Git Workflow":
The vast majority of the time, my cleanup is just a squash merge.
git checkout master
git merge --squash private_feature_branch
git commit -v
I decide my change should be broken into smaller changes, so squash is too blunt an instrument. (As a rule of thumb I ask, “Would this be easy to code review?”)
git rebase --interactive master
(not an option in your case, as you mention in your question)
Maybe my feature branch existed for a very long time, and I had to merge several branches into my feature branch to keep it up to date while I work. History is convoluted.
It’s easiest to grab the raw diff create a clean branch.
git checkout master
git checkout -b cleaned_up_branch
git merge --squash private_feature_branch
git reset
I now have a working directory full of my changes and none of the baggage from the previous branch. Now I manually add and commit my changes.