how do a Git Rebase in Sourcetree?

24,244

Your original structure would not support rebasing. Let's say you had a commit to your local master and someone else had committed (and pushed) another change to origin/master. In this scenario, you could rebase your commit on top of the other commits.

Your scenario has a commit from a completely different branch. You would either need to merge your other branch into master, or you could cherry pick that one commit and apply to the master branch.

Share:
24,244
shicholas
Author by

shicholas

Updated on July 23, 2022

Comments

  • shicholas
    shicholas almost 2 years

    I want my local master branch to include the commit 'fixed js errors' and be rebased into origin/master.
    enter image description here

    I started the process like this: enter image description here

    Which leads me to this: my Sourcetree

    But as you can see, I'm asked to pull before I push. And every time I pull I end up with a situation depicted in the first image. What am I doing wrong?! Thanks,