首页 > 系统 > Android > 正文

android studio配置git和github进行版本控制

2019-11-09 15:17:40
字体:
来源:转载
供稿:网友

1.安装配置

默认大家都已经安装了Git软件,参考下图进行git与as关联

配置git ,找到你的git安装的bin目录配置git

设置GitHub用户信息 配置GitHub账号信息

填写完用户名,密码后可以点击Test,出现下图怎么配置成功测试是否连通

2.分享项目到GitHub

开启GitHun插件 分享

创建关联的库,点击Share进行分享创建关联的库

点击ok提交代码提交代码

这样我们就把本地项目已经与github关联起来了,请看下图。左边的是用来更新github上面的项目的,右边是用来提交我们本地项目的 这里写图片描述

3.注意事项

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” –

由于刚配置的环境,没有配置会出现这样的错误。大致意思是需要一个名称才能提交到github上面,解决办法如下图,第一个是设置邮箱地址,第二个是设置用户名这里写图片描述


发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表