1.测试本地git

File->Settings->Git
Path to git executable:/usr/bin/git
测试
ubuntu Android Studio 上传代码到github

2.GitHub配置

填写用户名密码然后测试是否能连上
ubuntu Android Studio 上传代码到github

3.创建本地git仓库

VCS–>Import into Version Control–>Create git Repository
选择工程根目录作为git仓库

4.添加文件到git仓库

Project视图选择项目名右击–>Git–>Add
添加后变成了绿色

5.上传项目到github

VCS–>Import into Version Control–>Share Project on github
直接点击share即可
出现:
Can’t create repository: SerialPort 422
Unprocessable Entity - Repository creation failed.
fix:**问题
把**传给github即可
直接点击share分享
https://github.com/Kylinshui/SerialPort
项目参考:https://github.com/cepr/android-serialport-api
由Android Studio完成

相关文章: