I have a local branch, we use git -flow with Pull Requests, and I'm looking to crush a few commits after getting PR feedback.
How can I squash all my commits (e.g. from PR) into one branch?
I assume it will be something like:
git checkout master
but I'm not sure.
Using these many steps also seems to be a good argument in favor of using a function to tie it all together and simply pass the branch name as a parameter. Of course, automation will mean that you need to handle errors, exceptions, cross cases, etc.
I do not want to use interactive reboot, because it is a little difficult to do for the beginners that I train. I also do not want to know the number of commits, I just want to do all the ones that exist in this thread.
git git-branch git-checkout git-merge git-squash
Michael durrant
source share