git GitKraken 不会推送到新的远程(“选择远程分支以使用 'master' 进行推送/拉取:”)
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/38299211/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
GitKraken won't push to new remote ("Select remote branch to push/pull with 'master': ")
提问by janat08
So I've create a new repo on remote, and managed to connect it (I belief) to client (Git Kraken). Now it want a branch name from me for a repo that doesn't have any. Note that its also ...push/pull with "master":, that is master with a colon. Pretty much explaining a mechanic that is at play here is as welcome as actually drawing out steps.
所以我在远程创建了一个新的 repo,并设法将它(我相信)连接到客户端(Git Kraken)。现在它想要我的一个分支名称,用于一个没有任何回购的仓库。请注意,它也......用“master”推/拉:,即带冒号的主人。几乎解释在这里起作用的机制就像实际绘制步骤一样受欢迎。
回答by Masoud Azizpour
You'd need to "Set Upstream" for your local branch. To do so:
您需要为本地分支“设置上游”。这样做:
- Find your local branch on left pane under LOCAL,
- right-click and select "Set Upstream",
- name your new remote branch on the prompt and click "Submit",
- click "Push" on the top toolbar.
- 在 LOCAL 下的左窗格中找到您的本地分支,
- 右键单击并选择“设置上游”,
- 在提示上命名您的新远程分支,然后单击“提交”,
- 单击顶部工具栏上的“推送”。
To avoid confusion, you could also name your local branch (to keep it the same as the remote) at the time of creating the branch from master or whichever remote you want to branch from.
为避免混淆,您还可以在从 master 或要从中分支的任何远程创建分支时命名本地分支(以使其与远程分支保持相同)。
Note: Though there shouldn't be drastic differences between versions, the above is based on GitKraken 2.5.0 64-bit (non-pro version)
注意:虽然版本之间应该没有太大差异,但以上基于 GitKraken 2.5.0 64 位(非专业版)
回答by charliethegoldfish
I had this same problem - I typed in "origin/master" and that pushed it for me, I guess it just wants to know where it is pushing it to even if there is only one place.
我遇到了同样的问题——我输入了“origin/master”并为我推送了它,我想它只是想知道它把它推送到哪里,即使只有一个地方。
回答by Nickfmc
If you have connected to a "Remote" successfully and you see it in your list under remotes. what ever name you gave it there is what you need to type in when you see that message. So for the example below you can type origin/master but only because when setting up the remote I called it origin.
如果您已成功连接到“Remote”并且您在遥控器下的列表中看到它。你给它起什么名字,当你看到那条消息时,你需要输入什么。因此,对于下面的示例,您可以键入 origin/master 但这只是因为在设置遥控器时我将其称为 origin。
回答by wasp8898
When setting upstream, include the /master like this.
设置上游时,像这样包含 /master 。
"whatever-repo-name/master"
“无论回购名称/主人”
This worked for me.
这对我有用。