一个android菜鸟android studio 上传项目到github之旅

来源:互联网 发布:平安银行淘宝卡 白金卡 编辑:程序博客网 时间:2024/06/16 14:31

http://blog.csdn.net/a10615/article/details/52135617 该篇文章对于我后面遇到的问题有详细的解释。

下面我主要来说说我遇到的问题了,android studio 对于上传项目到github是十分方便的,所需要的配置,链接中的文章有详细的介绍了,我就不多介绍了。在新版本的android studio 中上传项目到github 中 是很简单的  



点击share project ongithub ,首次会提示你输入github的账号和密码的,一切OK后,最后提示我

Can't finish GitHub sharing process

Successfully created project 'Test' 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 (null)>) not allowed during executing git -c core.quotepath=false commit -m "Initial commit" --


这个问题是git 没有配置,找到gitbash.exe 运行 输入下面配置就可以了


  1. git config --global user.email "you@example.com"  
  2. git config --global user.name "Your Name"

注:这段也是我从网上找的大笑


虽然报了这个错误,但是github上还是可以看到自己刚刚的repository,但是会有提示你需要创建README.MD文件什么的,我直接复制了第一提示的解决内容,然后再gitbash.exe 中运行了,这时候github上远程仓库就创建好了,但是你还需要将你程序的代码提交上来了,接下来的步骤和遇到的问题在文章头部给出的链接的文章中都有详细的介绍,大家可以去看看了

在git  配置完后,我尝试过将远程仓库删掉,然后本地项目git 关联解除,然后再share ,但是和之前一样,并没有提示我push成功,所以我后来按照上面文章中步骤中一步一步来,后面中就解决了。本人是个菜鸟,第一次用git,希望大家勿喷

0 0
原创粉丝点击