Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/20.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 push“;命令但它就是不起作用_Git_Github_Push - Fatal编程技术网

我试图使用“将我的更改推送到我的在线存储库”;git push“;命令但它就是不起作用

我试图使用“将我的更改推送到我的在线存储库”;git push“;命令但它就是不起作用,git,github,push,Git,Github,Push,显示的错误是: 警告:push.default未设置;它的隐含价值在过去发生了变化 Git2.0从“匹配”到“简单”。要压制此消息 并保持传统行为,使用: git config--全局推送.default匹配 要立即消除此消息并采用新行为,请使用: git config——global push.default simple 当push.default设置为“匹配”时,git将推送本地分支 已存在同名的远程分支。 自Git2.0以来,Git默认为更保守的“简单” 行为,它仅将当前分支推送到相应的

显示的错误是:

警告:push.default未设置;它的隐含价值在过去发生了变化 Git2.0从“匹配”到“简单”。要压制此消息 并保持传统行为,使用: git config--全局推送.default匹配 要立即消除此消息并采用新行为,请使用: git config——global push.default simple 当push.default设置为“匹配”时,git将推送本地分支 已存在同名的远程分支。 自Git2.0以来,Git默认为更保守的“简单” 行为,它仅将当前分支推送到相应的 “git pull”用于更新当前分支的远程分支。 有关更多信息,请参阅“git帮助配置”并搜索“push.default”。 (Git 1.7.11中引入了“简单”模式。请使用类似的模式 (如果有时使用较旧版本的Git,则使用“当前”而不是“简单”) 致命:当前分支主机没有上游分支。 要推送当前分支并将远程分支设置为上游,请使用 git push--设置上游原始主机

我收到了一些建议使用git push的评论——设置上游原始主机。但我很抱歉,这也失败了

ssh:无法解析主机名https:名称解析暂时失败致命:无法从远程存储库读取。请确保您具有正确的访问权限,并且存储库存在

似乎您使用的URL是错误的,您说的是
https://
,而不是
https://
。要更改URL,请执行以下操作:

git remote add origin https:/github.com/bitchimmadonna/Repository1.git
git push -u origin master
现在


应按预期工作。

错误日志中的git push-u origin master
:要推送当前分支并将远程设置为上游,请使用git push-set upstream origin master。已尝试过,但仍无法工作。git push-u源站主机ssh:无法解析主机名https:名称解析暂时失败致命:无法从远程存储库读取。请确保您具有正确的访问权限并且存储库存在。您所说的“不工作”是什么意思?
https://
vs
https://
git remote add origin https:/github.com/bitchimmadonna/Repository1.git
git push -u origin master
git remote set-url origin https://github.com/bitchimmadonna/Repository1.git
git push -u origin master