Search code examples
gitgit-remotegitkraken

How to use multiple remotes with GitKraken


I'm using GitKraken quite frequently, but I cannot manage how to set to which remote I want to push. In the context menu I cannot find any entry like "use this remote for push/pull".

I have to set it via the command line, then it works as expected.

git push -u origin2 dev/mybranch

is this really a missing feature?


Solution

  • I'm currently trying to configure correctly more than one remote repo.

    I understood that you have already setup correctly your remotes (by click plus simbole near REMOTE). Now :

    • if you fetch (pull) some branches from remotes: the default are automatically set to remote you chose/click in REMOTE section.
    • if you create a new branch: when you push first time, at the top of gitkraken window appear confirmation message. There you can chose which remote to push. Your chose will set as default for that branch.
    • if you want to change remote of a branch already in use: right click on desired brach in LOCAL section, in the menu you can find "set ", in my case "set upstream". So appear at the top of gitkraken window the confirmation message to setup the default remote for that branch.

    You can check the result in the .git/config file in the home dir of your project.

    Edit: Ok, I've tested this solution for some day. It's running structurally and I confirm this solution. Evenif when you switch from one branch with some remote to an other brach with different remote, some times the ui not responding correctly (freez or stop refreshing). So a I need to close and reopen gitkraken.