|
|
|
|
|
by fleekonpoint
721 days ago
|
|
I also like rebasing. Sometimes my squashing cannot be completed without manual intervention, so I'll do a squash merge into a temporary branch instead: git checkout main
git checkout -b squash-branch
git merge --squash [branch-to-rebase]
At this point I usually git diff the two branches as a sanity check before merging back into main: git diff [branch-to-rebase]
git checkout main
git merge squash-branch
I am normally able to squash rebase 99% of the time using git rebase -i main, but doing a git merge --squash into a temp branch has saved me a lot of hassle over the years. |
|