我已经将一个远程仓库添加到我正在使用的文件夹中:
git remote add origin https://github.com/<username>/<repo>.git
如果我输入:
git pull origin master
我理解为:
From https://github.com/<username>/<repo>
* branch master -> FETCH_HEAD
fatal: refusing to merge unrelated histories
我也尝试过:
git pull origin master --allow-unrelated-histories
但是我得到:
From https://github.com/...
* branch master -> FETCH_HEAD
error: Your local changes to the following files would be overwritten by merge:
<files>
Please commit your changes or stash them before you merge.
Aborting
git remote add origin https://github.co/username/xxxxx.git
- ramab01git pull origin master --allow-unrelated-histories
请参见此处 https://dev59.com/ploU5IYBdhLWcg3wAjYs - Bhargav Variya