For me it solved the problem:
cd apps/frappe git reset --hard cd - cd apps/erpnext git reset --hard cd - bench switch-to-master
hope it helps