4

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?

3

1 Answer 1

6

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.

0

Not the answer you're looking for? Browse other questions tagged or ask your own question.