17

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?

Karl Zeilhofer
  • 420
  • 1
  • 4
  • 10
  • Did you find a solution for this? I'm facing the same issue. – eidsonator Jun 26 '17 at 13:32
  • 1
    If you right-click on your local branch, one of the menu items is "Set Upstream". Is that what you're looking for? @eidsonator FYI. – pjs Jun 26 '17 at 22:09
  • @pjs Thanks, I see how it works now. I've only been trying GitKraken out for about 2 days now. – eidsonator Jun 27 '17 at 12:43
  • @pjs Thank you, But I think the best solution is - right click the remote server and click 'push' menu, or when I click 'push' button on the top allow me select a remote server. – Rwing Apr 11 '19 at 11:25

3 Answers3

18

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.

daveaie
  • 334
  • 2
  • 9
7
  1. Right-Click on the local branch from which you want to pull, click on Set Upstream. Set Upstream

  2. Select the origin that you want to push, click submit. Select Origin

Now, pushing (clicking on the Push button) will push to the selected origin! And when you want to change the origin the next time, repeat the step-1 and push.

Mihir Joshi
  • 426
  • 5
  • 14
0

You can also drag and drop to push to a different remote:

Drag and drop to push

Source: https://help.gitkraken.com/gitkraken-client/pushing-and-pulling/#drag-and-drop-to-push

jjz
  • 925
  • 1
  • 13
  • 21