How can I squash my last X commits together into one commit using Git?
What about an answer for the question related to a workflow like this?
merge --squash
after the PR, but the team thought that would slow down the process.)I haven't seen a workflow like that on this page. (That may be my eyes.) If I understand rebase
correctly, multiple merges would require multiple conflict resolutions. I do NOT want even to think about that!
So, this seems to work for us.
git pull master
git checkout -b new-branch
git checkout -b new-branch-temp
git checkout new-branch
git merge --squash new-branch-temp
// puts all changes in stagegit commit 'one message to rule them all'
git push