我已经在我正在使用的文件夹中添加了一个远程存储库:
git remote add origin https://github.com/<username>/<repo>.git
Run Code Online (Sandbox Code Playgroud)
但是当我打字的时候
git pull origin master
Run Code Online (Sandbox Code Playgroud)
来自https://github.co/username/xxxxx
*分支主控 - > FETCH_HEAD
致命的:拒绝合并不相关的历史
当我打字的时候
From https://github.com/<username>/<repo>
* branch master -> FETCH_HEAD
fatal: refusing to merge unrelated histories
Run Code Online (Sandbox Code Playgroud)
Fer*_*osa 47
您需要首先进行更改reset或commit更改:
git reset --hard
Run Code Online (Sandbox Code Playgroud)
要么:
git commit -m "saving changes..."
Run Code Online (Sandbox Code Playgroud)
然后你可以这样做:
git pull origin master --allow-unrelated-histories
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
18754 次 |
| 最近记录: |