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

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

 

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

通过android studio上传项目到github

通过android studio上传项目到github

点击test,会弹出successful!

第三步,上传项目

通过android studio上传项目到github

 

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

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

 

相关文章:

  • 2021-06-07
  • 2022-01-01
  • 2021-09-05
  • 2021-05-04
  • 2021-11-26
  • 2021-11-13
猜你喜欢
  • 2021-06-19
  • 2021-10-29
  • 2021-04-25
  • 2022-01-19
  • 2022-12-23
  • 2021-09-03
  • 2021-12-31
相关资源
相似解决方案