git 使用之常见的失败以及就解决方法


将远程仓库的代码pull下来

git pull origin master 

报错: fatal: refusing to merge unrelated histories

 解决方法: git pull origin master   --allow-unrelated-histories


clone 非master分支

git clone -b first [remote_address]

报错:fatal: destination path '*' already exists and is not an empty directory.

解决方法:创建一个空的文件夹,将代码clone至此便可

git clone -b first [remote_address]

你可能感兴趣的:(git)