cd ~/frappe-bench # or your bench path
cd ./apps/frappe && git fetch upstream && git checkout master && cd -
cd ./apps/erpnext && git fetch upstream && git checkout master && cd -
bench update --requirements
bench update --patch
if above cant fix it, then do…
cd ./apps/frappe && git clean -df && git fetch upstream && git checkout master && cd -
Its always do to do backup!