In this tutorial, we'll learn how to convert a git branch from many commits into a single commit before merging it. There's one key command to learn: git rebase -i
Let's assume that you have a branch, feature/foo
, that was branched off of develop
. The git log might look something like this:
* baec937 (HEAD -> feature/foo) remove TODO comment
* 4fb174d add spec for foo model
* bb84984 update the foo serializers