I forgot to check the option interactive
when rebasing a branch. I need one final commit but instead I have N commits on master. Is it possible to squash commits after the rebase process was finished?
1 Answer
Yes you can rebase them again. Use the following command for an interactive rebase:
git rebase --interactive <commit-id>
Where <commit-id>
is the last commit you want unchanged. After that an editor will show up. Change all the pick
commands to squash
for the commits you want squashed into one.
interactive
.