Git refusing to merge unrelated histories

今日剛在Bitbucket 建立左一個新既 repos
當我嘗試 push local 的一個 git repos上去既時候出現了以下的錯誤信息 (當我嘗試 Pull 這個 repos 去 local 的 repos 時) “fatal: refusing to merge unrelated historiesgit Refusing To Merge Unrelated Histories

如果了解自己的 repos 和在 git/bitbucket上的沒有衝突的話 解決方法分簡單 我們只需要輸入以卜git 指令便可以

git pull --allow-unrelated-histories

Hope you find it useful

Chi Yau
Chi Yau
Software Engineer

Interested on Learning new stuff and experience sharing