GIT操作

一、git clone

从远程拷贝别人的库来使用

$ git clone <版本库的网址>
$ git clone  https://github.com/taotao8810/TianChi-Game.git

添加一个自己的远程仓库

$ git remote add origin https://github.com/taotao8810/xxxxx.git

 

如何去解决fatal: refusing to merge unrelated histories
先pull,因为两个仓库不同,发现refusing to merge unrelated histories,无法pull
因为他们是两个不同的项目,要把两个不同的项目合并,git需要添加一句代码

git pull origin master --allow-unrelated-histories

 

posted @ 2018-01-24 18:46  冷幽篁  阅读(177)  评论(0编辑  收藏  举报