Skip to content

Instantly share code, notes, and snippets.

@frengky
Created September 10, 2021 06:13
Show Gist options
  • Save frengky/74cb9e42a4a15716e4a7543df3814880 to your computer and use it in GitHub Desktop.
Save frengky/74cb9e42a4a15716e4a7543df3814880 to your computer and use it in GitHub Desktop.
How to GIT rebase with sourcetree

How to GIT rebase with sourcetree

Sourcetree is a simple and powerfull Git GUI.

After working on a feature with separate branch, we may want to integrating the feature to the master branch using rebase instead of merge, so the overall history will look much cleaner and neater at the end.

Step 1: Checking out to feature_a branch, right click the master branch and rebase interactively

image

Step 2: Select the top most commit, and squash with previous commit

image

Step 3: Edit commit message, summarize all commits in feature_a

image

Step 4: Rebase is done and the overall commit history is look much neater now

image

Use the force push options to push the changes to the remote origin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment