好长时间了自己写了一个app,今天想的是关联到GitHub上吧,然后就开始了.
1.首先VCS-----Checkout from Version Control----Git 把git地址写进去
2.Import into Version Control---Create Git Repository 把写好的项目写进去
选择Git---add—commit---pull----push
然后就好了,可是我pull的时候不行,报错Git Pull Failed: refusing to merge unrelated histories,未关联的历史.然后问百度参考这个
https://blog.csdn.net/isxiancai/article/details/79344264 主要是在 命令窗 输入下面命令:
git pull --rebase origin master(我输入这个就对了)
ok 然后pull push就好了.
如果报错Push to origin/master was rejected 参考这个链接 https://blog.csdn.net/ainuser/article/details/79056249 就ok
主要是在命令窗输入这个 git pull origin master --allow-unrelated-histories
******************注意是在命令窗下面输入*******************************
ok 大功告成亲测有效,有疑问可以评论哦