通过android studio上传项目到github


第一步,下载git客户端,并且安装

下载地址:https://git-for-windows.github.io/

 

第二步,在android studio中配置git(注意第一张图中的C:\Program Files\Git\bin\git.exe 是我的git安装后的bin目录)以及github账户(若没有,需要提前到github上注册)

点击test,会弹出successful!

第三步,上传项目

 

 第一次上传的时候提示如右上角,显示已创建库,但是代码没有上传。

Can’t finish GitHub sharing process 
Successfully created project ‘GitHubDemo’ on GitHub, but initial commit failed: 
* Please tell me who you are. Run git config –global user.email “you@example.com” git config –global user.name “Your Name” to set your account’s default identity. Omit –global to set the identity only in this repository. fatal: empty ident name (for ) not allowed during executing git -c core.quotepath=false commit -m “Initial commit xxx” –

 

我的解决办法:

再次重复第三步骤就可以了,会弹出输入hgithub的账号密码界面,然后就成功了。也可以在github上看到。

网上有个其他的解决办法:http://blog.csdn.net/baidu_17313961/article/details/52068846

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM