建議 git push方式 - daniel-qa/Vue GitHub Wiki
- 你不小心修改了本地很多東西,pull 時又被干擾
如果你有很多 local 修改未 commit,git pull 有機會報錯或卡住,例如:
error: Your local changes to the following files would be overwritten by merge:
➡️ 解法有幾種(視情況):
A. 暫存起來
git stash
git pull
git stash pop
B. 或直接 commit 再 pull(若確定沒衝突)
git add .
git commit -m "WIP: my local changes"
git pull --rebase # 建議用 rebase 更乾淨