If you ever needed to rebase (with or without squashing) interactively on the git command line, you know that this is a tedious task. What if I told you, there’s a way to do this much easier?
You need the following setup:
masterbranch as destination (clean)
- Your source branch with commits to squash (We will call it
You need to be on the
master branch, then run the following command:
git merge --squash work
Now you have your changes on the destination branch. Now you can commit everything at once, done.