repo是git倉庫管理工具,一般用repo sync
去更新代碼,實質上是在每個倉庫下執行git pull
,這樣就比較蛋疼了,當你本地有提交的話它會自動幫你merge進去,還裝做一切都ok的樣子。在被坑了數遍之後,終於發現了這個問題。
徹底的同步服務器代碼
$ repo sync -d
# Remove all working directory (and staged) changes.
$ repo forall -c 'git reset --hard'
# Clean untracked files
$ repo forall -c 'git clean -f -d'