以此共勉!
錯(cuò)誤類型:
-
錯(cuò)誤:image.png
錯(cuò)誤原因:django的版本問題
正在使用的版本:1.11

image.png

image.png
應(yīng)該配置的方法為:

image.png
- 錯(cuò)誤: ! [rejected] master -> master (non-fast-forward)
git遠(yuǎn)程庫還有文件沒有下載,兩個(gè)版本庫不同
在push遠(yuǎn)程服務(wù)器的時(shí)候發(fā)現(xiàn)出現(xiàn)此錯(cuò)誤;原因是沒有同步遠(yuǎn)程的master
解決辦法:1. 先pull - git pull --rebase origin master
- git push -u origin master -f
pull又踩坑
- 錯(cuò)誤:fatal: refusing to merge unrelated histories
git在最新2.9.2,合并pull兩個(gè)不同的項(xiàng)目,出現(xiàn)的問題如何去解決fatal: refusing to merge unrelated histories
我在Github新建一個(gè)倉庫,寫了License,然后把本地一個(gè)寫了很久倉庫上傳。
先pull,因?yàn)閮蓚€(gè)倉庫不同,發(fā)現(xiàn)refusing to merge unrelated histories,無法pull
因?yàn)樗麄兪莾蓚€(gè)不同的項(xiàng)目,要把兩個(gè)不同的項(xiàng)目合并,git需要添加一句代碼,在git pull,這句代碼是在git 2.9.2版本發(fā)生的,最新的版本需要添加--allow-unrelated-histories
假如我們的源是origin,分支是master,那么我們 需要這樣寫git pull origin master ----allow-unrelated-histories需要知道,我們的源可以是本地的路徑
解決辦法: git pull origin master --allow-unrelated-histories
