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?
You can add multiple remotes by using git remote or git config commands or editing the config file.
To add a new remote, use the git remote add command on the terminal, in the directory your repository is stored at. The git remote add command takes two arguments: A unique remote name, for example, “my_awesome_new_remote_repo” A remote URL, which you can find on the Source sub-tab of your Git repo.
You can have as many remote repositories as you want, but you must give them different names. The repository name is different in this case. Is the the word "origin" a name that can be changed? Yep, git remote rename <old> <new> : linux.die.net/man/1/git-remote.
Right-Click on the local branch from which you want to pull, click on Set Upstream.
Select the origin that you want to push, click submit.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With