Android Studio Git 推送被拒绝 [英] Android Studio Git Push Rejected

查看:44
本文介绍了Android Studio Git 推送被拒绝的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 github 上上传我的 Android 项目,但在尝试推送时出现此错误:

推送被拒绝:推送到源/主被拒绝

我做了这个步骤:

  • VCS->导入版本控制->创建新存储库...
  • 来自项目文件夹中的 git bash:

    git remote add origin

    之后,您可以毫无问题地Git > Push.

    I'm trying to uploading my Android Project on github but I get this error when I try to push:

    Push rejected: Push to origin/master was rejected
    

    I made this steps:

    解决方案

    As suggested in the comments you should pull the changes first, if you are working on a new repository that could happened when you create your remote repo with a readme or a licence file. To pull the changes from the user interface you should use, VCS > Git > Pull then select the master branch (depends)

    after that you can Git > Push without problem.

    这篇关于Android Studio Git 推送被拒绝的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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