Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/eclipse/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
‘;致命:没有配置为推送到’;执行'时出错;git推送';_Git - Fatal编程技术网

‘;致命:没有配置为推送到’;执行'时出错;git推送';

‘;致命:没有配置为推送到’;执行'时出错;git推送';,git,Git,我尝试签出一个远程分支 然后进行提交,然后推送 我得到fatal:当我执行“git push”时,没有配置为推送到的目的地错误 以下是我使用的命令序列: $ git checkout remote/test-1.6 $ git checkout -b test-1.6 $ git commit -a -m "commit message" $ git push fatal: No destination configured to push to. 谢谢。尝试使用添加远程回购 git remo

我尝试签出一个远程分支

然后进行提交,然后推送

我得到
fatal:当我执行“git push”时,没有配置为推送到
的目的地错误

以下是我使用的命令序列:

$ git checkout remote/test-1.6
$ git checkout -b test-1.6
$ git commit -a -m "commit message"
$ git push
fatal: No destination configured to push to.

谢谢。

尝试使用添加远程回购

git remote add remote http://.../repo.git
然后你可以做一个

git push remote test-1.6

您需要同时指定远程别名和要推送的分支(如果有多个分支,而您只想推送一个)

发件人:

[提交远程回购]您运行
git push[alias][branch]
,将尝试使您的[branch]成为[alias]远程服务器上的新[branch]

如果希望将所有分支推送到远程repo(或者只推一个分支),可以省略分支说明符并执行以下操作:

git push [alias]
对于你的具体情况,正如Mike在评论中指出的

git push remote test-1.6

应该能用。

好的,你必须先添加一个遥控器

git remote add myremote  [url]

然后您将能够使用:
git push myremote master
(或任何其他分支)

推送您的存储库可能已经有了一个远程,但您的新分支尚未配置为使用它。这应该起作用:

git push --set-upstream remote test-1.6
完成这一步后,现在有了一个跟踪分支,您可以在将来简单地使用“git push”——假设您已将当前分支的上游推送配置为默认值,如下所示:

git config --global push.default tracking
或(首选)从git 1.7.4开始:

git config --global push.default upstream