How to make a rebase with Source Tree creating only one new commit with new message

Posted by Daniel Vela on April 19, 2017

If you want to merge two branches- but don’t want to keep separated banches and fix the messages of branch-, you can use an interactive rebase.

Using rebase, branches aren’t maintained in the repository. Using rebase you can move one branch to the top of another.

original rebase

But git-rebase has another fantastic feature: interactive rebase. With this type of rebase you can edit commit messages, even mix several commits into one. This is very useful to keep a well documented git log without noise.

feature

To use this method, first checkout the branch you want to rebase(the secondary branch). Then select the last commit of destination branch(the main one).

interactive

To avoid merge conflicts is very, very important to apply command “Squash with previous commit…” always on top of the commit list after rebase. After all the Squash the commits must by ordered

squash

Final result

Only one thread, only one commit message. Cheers!!!

final

Additional info from atlassian web

In git we trust