Git错误

$ rm -rf .git 

$ git config --global core.autocrlf  false     

$git init 

$git add .

------------------------------------------------------------------

  $ git remote add origin git@githun.com:youName/ gitdemo.git   

--------------------------------------------------------------------

 

fatal: refusing to merge unrelated histories
或者
 failed to push some refs to 'git@gitee.com:SeaLee/VueDemo'

说明:本地的仓库和服务器上的仓库有文件没有同步,应该先拉去服务器上的文件下来进行合并,然后整理之后提交

解决办法:

git pull origin master --allow-unrelated-histories

 

posted @ 2017-10-25 15:53  Sealee  阅读(182)  评论(0编辑  收藏  举报