新的android studio 项目和空 gitblit 版本库关联

1. 在 gitblit 上创新新的版本库,复制 http 地址

2. android studio 配置

  a. VCS-->Enable Version control integration--> 选择Git,使能git

  b. VCS-->Git-->Remotes --> 点击加号 --> 贴上地址

  c. VCS --> commit 一个版本

  d. VCS --> Git --> push --> 上传到版本库

  e. 查看结果

 

问题:将android studio中所有的文件都添加进commit中后出现

9:52    Error merging: refusing to merge unrelated histories
9:52    Push rejected: Push was rejected, and update failed with error.

解决办法:命令行输入,git pull origin master --allow-unrelated-histories 

 

 

posted @ 2019-01-10 09:48  liuyj_vv  阅读(947)  评论(0编辑  收藏  举报