問題描述:
>error: Your local changes to the following files would be overwritten by merge:
意思是我臺(tái)式機(jī)上新修改的代碼的文件言秸,將會(huì)被git服務(wù)器上的代碼覆蓋低滩;我當(dāng)然不想剛剛寫的代碼被覆蓋掉
解決方法:
一:
如果你想保留剛才本地修改的代碼糯钙,并把git服務(wù)器上的代碼pull到本地(本地剛才修改的代碼將會(huì)被暫時(shí)封存起來)
git stash
git pull origin master
git stash pop
二、
如果你想完全地覆蓋本地的代碼里伯,只保留服務(wù)器端代碼含思,則直接回退到上一個(gè)版本崎弃,再進(jìn)行pull:
git reset --hard
git pull origin master