在本地建立了倉庫,遠程也創建了項目。
然后將本地項目和遠程項目關聯。
git remote add origin https://gitee.com/xxxx/xxxxxx.git
關聯后push代碼出現下面錯誤。
解決:
1) 先在本地pull遠程項目
git pull origin master --allow-unrelated-histories
2)再在本地commit提交,然后push,最后提交成功。
在本地建立了倉庫,遠程也創建了項目。
然后將本地項目和遠程項目關聯。
git remote add origin https://gitee.com/xxxx/xxxxxx.git
關聯后push代碼出現下面錯誤。
解決:
1) 先在本地pull遠程項目
git pull origin master --allow-unrelated-histories
2)再在本地commit提交,然后push,最后提交成功。
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。