Sublime Forum

Working with Multiple Remotes

#1

I would like to be able to use Sublime Merge with multiple remote repos. How do I add additional remotes and manage pushes and pulls within Sublime Merge?

Thanks!

0 Likes

#2

Hi @henry212,

Thanks for sharing your question with us.

Adding remotes via command palette
Open the command palette ctrl + p ( cmd + p on MacOS) and select Add Remote....
You can then set the remote name and remote URL.

Fetching from the new remote
Once you’ve set the new remote, you should do an initial fetch from the remote repository. This will pull all the remote branches into your local repository. To do this, locate the new remote in the locations bar (under the Remotes section. Open the context menu of the remote (right-click) and select Fetch from REMOTE_NAME.

Onces you’ve done these steps, you can begin making local changes and pushing branches to / pulling branches from the remote repository. When pushing, you can either push to a new branch in the remote repository, or push to an existing branch. To push to an existing branch, follow the steps below.

Setting the default upstream
The default upstream is used to control where a local branch is pushed to on a remote repository.
You can set this via the command palette using the Set Branch Upstream option.
Note that you’ll need to have done an initial fetch from the remote repository before setting an upstream.

Let me know if you have any further questions.

Kind regards,
- Dylan

2 Likes

#3

Thanks so much for this reply!

0 Likes

#4

Is there any way to style the selected remote in the drop down list that is presented when two remotes exist?

I had a recent situation where I had a repository with one upstream remote on ADO, and one on my own GOGS server.

It suddenly started to default to GOGs after weeks of correctly defaulting to ADO. For speed (and impatience) I just removed the GOGS reference in the end.

But things were complicated by the fact that with exactly 2 remotes, and with the default dark theme, it’s a bit of a guess which one is selected at any time. I find this a common problem with a lot of modern flat interfaces, it’s not always obvious which of two menu choices is currently highlighted.

0 Likes