1.移除old git related:
find . -name ".git" | xargs rm -Rf
2.init new git:
git init
3.git綁定新的地址:
git remote add origin "git address"
4.git add .
5.git commit -m "init git"
6.準(zhǔn)備pull的時(shí)候出現(xiàn)了錯(cuò)誤
Auto packing the repository in background for optimum performance.
See "git help gc" for manual housekeeping.
fatal: refusing to merge unrelated histories
先解決gc的問題:
git fsck
git gc --prune=now
然后:
git pull origin master --allow-unrelated-histories
7.繼續(xù)git pull origin master & git push origin master
?Enjoy it!