Git推送错误| Bitbucket存储库 [英] Git Push Error | Bitbucket Repository

查看:133
本文介绍了Git推送错误| Bitbucket存储库的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们试图在Bitbucket中将我们的本地内容推送到我们的存储库中,但在提交文件后尝试git push时出现以下错误。




$ b $ pre $ git push -u原点大师
致命错误'origin'不会出现成为git存储库
致命:无法从远程存储库读取。

您可以在这方面帮助我们吗?

解决方案

我只是遇到了同样的问题,这可能对您有所帮助:

 #初始化文件夹中的git 
git init
#add远程存储库(这对我来说不起作用)
git remote add origin https://myusername@bitbucket.org/myusername/myrepo.git
#...所以我后来改变它(在一些git添加和提交命令后)
git远程设置 - url来源https://myusername@bitbucket.org/myusername/myrepo.git
#现在它已经工作了:
git push -u原点大师

如果出现错误消息远程原点已经存在,运行:

  git remote rm origin 


We are trying to push our local contents to our repository in "Bitbucket" but we are getting the following error while trying to "git push" after committing our files.

Error Message

$ git push -u origin master
fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.

Can you people help us in this regards?

解决方案

I just had the same problem, this may help you:

#initialize git in the folder   
git init
#add remote repository (this did not work for me)
git remote add origin https://myusername@bitbucket.org/myusername/myrepo.git
#...so i changed it later (after some git add and commit commands)
git remote set-url origin https://myusername@bitbucket.org/myusername/myrepo.git
#now it worked:
git push -u origin master

If you get the error message remote origin already exists, run this:

git remote rm origin

这篇关于Git推送错误| Bitbucket存储库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆