简体   繁体   English

Bitbucket推送Git存储库不起作用

[英]Bitbucket pushing Git Repository not Working

I am working in Android Studio and I recently created a local git repository and I trying to push them to bitbucket in an empty Repository. 我在Android Studio中工作,最近创建了一个本地git存储库,我试图将它们推送到空存储库中的bitbucket中。 So I followed the instructions (I'm working on Linux): 因此,我按照说明进行操作(我在Linux上工作):

$ cd /path/to/my/repo
$ git remote add origin https://tdmsoares@bitbucket.org/tdmsoares/stingy-money.git
$ git push -u origin --all

When I type this last line, I receive this message: 当我键入最后一行时,我收到以下消息:

$ git push -u --all
refs in common and none specified; doing nothing.
Perhaps you should specify a branch such as 'master'.
Everything up-to-date

I found it strange because because when working in Android Studio, it shows me I am in a Master Branch. 我发现这很奇怪,因为在Android Studio中工作时,它表明我在Master分支中。

Maybe it can be a rookie mistake (I am beginner at Git). 也许这可能是菜鸟的错误(我是Git的初学者)。 I searched for this problem and what I found didn't solve this issue. 我搜索了此问题,但发现没有解决该问题。

The push depends on your git version. 推送取决于您的git版本。

Prior to GIT2.x the push used the simple value while starting at GIT2.X it has changed to matching so again depend on your git version looks like you have to use the following lines: 在GIT2.x之前,推送从GIT2.X开始使用了simple值,它已更改为matching因此再次取决于您的git版本,看起来您必须使用以下行:

# Update your local copy
git fetch --all -- prune

# push your changes 
git push origin master 

What does the error means: 错误是什么意思:

It simply means that you have not committed anything. 这仅表示您尚未执行任何操作。 add your content and then commit & push. 添加您的内容,然后提交并推送。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM