androidstudio上传代码到git上

时间:2021-06-25 03:50:37

1、首先通过git --bare init 在服务端创建好了一个git仓库;假设git仓库在服务端的地址为:/user/lyh/project/test.git

2、androidstudio上点击VCS --- import into version control --- create git repository ;如下图:

androidstudio上传代码到git上

3、选择一个要提交到远程仓库的文件夹,点击OK:

androidstudio上传代码到git上

4、右键要提交的项目,如下图操作:

androidstudio上传代码到git上

5、打开弹出后选择commit and push,如下图:

androidstudio上传代码到git上

6、在弹窗中填写远程仓库的地址,点击提交,即可