3

I cloned a Git repo/branch (origin/master). I made my changes and committed on another branch (mine) and I set another remote for it (office/mine). I did three commits actually.

Now there are updates on origin/master that I need to incorporate. I guess what I need is to rebase my changes on top of latest origin/master, but I'm not quite sure how to proceed.

I'm using Sublime Merge and I can't see that option or I'm not looking on the right menus.

mkrieger1
  • 19,194
  • 5
  • 54
  • 65
KcFnMi
  • 5,516
  • 10
  • 62
  • 136

1 Answers1

4

Here is how to replicate the command git rebase origin/master mine in Sublime Merge:

  • Check out the branch you want to rebase (mine).
  • In the "Commits" view (Ctrl+2 by default), right-click on the latest commit of the branch you want to rebase onto (origin/master).
  • Choose "Rebase mine onto origin/master".
mkrieger1
  • 19,194
  • 5
  • 54
  • 65
  • It looks like my commits are re-created on top of latest `origin/master`, which makes sence. Should I push this `mine` to `office/mine`? – KcFnMi Oct 07 '21 at 13:09
  • That's the nature of a rebase. I don't know if you want to push this to office/mine. If you want to sync the "office" repository to the current state, then probably yes. – mkrieger1 Oct 07 '21 at 13:09
  • Following these instructions I reached a diverged state. One additional merge then seem to clean things. – KcFnMi Oct 07 '21 at 13:19