Git push 命令,遇到错误 -fatal : invalid refspec 'https://github.......git'

标签 git push refspec

我在 master分支并添加了远程分支,之后我无法将数据从本地推送到远程。:

$ Git remote add master https://....git

$ Git push origin master https:// ...git
Fatal: invalid refspec 'https://...git'

最佳答案

你应该“git remote addorigin ,不是 master :

git remote add origin https://...
git remote remove master
git push -u origin master

关于Git push 命令,遇到错误 -fatal : invalid refspec 'https://github.......git' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58569044/

相关文章:

apple-push-notifications - CloudKit 正在限制来自 CKQuerySubscription 的推送通知的数量

git 。当推送不处理 .git/info/exclude 时忽略文件

ios - Firebase 通知未在 App 非事件状态下接收?

git - 是否有可以解决错误 : remote branch 'refs/heads/foo/bar' not found? 的 git 命令

git - 如何禁用git自动 merge

Git checkout旧的提交,并进一步进行新的提交

git - 多次提交类似 "tag"

objective-c - 如何让 podspec 尊重 "head:"论点?

git - src refspec ~ 不匹配任何