Sublime Forum

How to pull like Tower

#1

Here’s how I do it in Tower:

04

I tried various commands, pull, rebase; they all ask for more info, like which branch. I don’t know how to give the info. Am I supposed to enter Git commands? I bought SM to avoid this.

How can I do this in Sublime Merge, preferably in one command that’s available with one click like Tower?

0 Likes

#2

Hi @trebitzki,

Thank you for sharing your feedback with us.

EDIT: You can do this via the dropdown menu of the pull button pull
From here, you can select pull --rebase

If you would like to default to rebase for all pulls, you can run the following command:
git config pull.rebase true

For more information, see:
https://git-scm.com/docs/git-config#Documentation/git-config.txt-branchltnamegtrebase
https://git-scm.com/docs/git-config#Documentation/git-config.txt-pullrebase

Kind regards,
- Dylan

2 Likes

#3

Thanks @djohnston! Of course I tried pull -- rebase several times, but it wants the branch; that’s where I’m stuck:

38

Where/how do I enter that?

0 Likes

#4

Hi @trebitzki,

You can set the upstream (tracking information) of a branch by right-clicking the branch in the Locations bar and selecting Set upstream…

Let me know how you go.

Thanks,
- Dylan

0 Likes

#5

Hi @djohnston,

I finally figured it out!

Must admit I had problems with the dark theme again. The Set upstream setting didn’t make sense to me:

55

… until today, when I realised that this is a dialog window. I just had to click the (only) option!!!
How about putting a border around it?

I think I still need help with the git setting you mentioned: git config pull.rebase true. I assumed that the --rebase would then be set in the pull dropdown –– but it’s still on the default pull --ff-only. Do I need to restart SM? Nope, doesn’t stick.

BTW a git terminal inside SM would be great and obviate cd-ing to the repo. Is that on the horizon?

Thanks for your patience!
Timm

0 Likes

#6

Hi @trebitzki,

Thank you for your feedback regarding the dialog - I’ll be looking into ways to address this in the future.

My advice on setting pull.rebase was erroneous, and will only work for the default pull action (within Git). As you can see in Sublime Merge, the default is pull --ff-only which will override the config setting.

The best options are:

  • Use pull --rebase from the pull dropdown
  • Use the default pull, and if a rebase is required a diverged banner will appear offering to perform a rebase.

Thanks,
- Dylan

0 Likes

#7

I just bought sublime merge, and this what the first thing that I could not do easily. I almost always do “git pull rebase --autostash”, there should be a way to make it the default. I wonder why is it no possible to change the default action (since 2020)?

Alternatively, would it possible to setup a keyboard shortcut to “pull rebase --autostash” ?

0 Likes

#8

Yes: https://www.sublimemerge.com/docs/key_bindings

0 Likes