Git Troubleshooting
Less than 1 minute
fatal: refusing to merge unrelated histories
root@root-Bro demo-gradle % git pull origin main
From github.com:imarshio/dmeo-gradle
* branch main -> FETCH_HEAD
fatal: refusing to merge unrelated histories
# 使用 --allow-unrelated-histories 来避免
root@root-Bro demo-gradle % git pull origin main --allow-unrelated-histories
From github.com:imarshio/dmeo-gradle
* branch main -> FETCH_HEAD
hint: Waiting for your editor to close the file... error: There was a problem with the editor 'vi'.
Not committing merge; use 'git commit' to complete the merge.
# 后面只需要在处理一下冲突,在 commit-push 一下就好了