That’s odd. Did you modify some files in the code?
Nonetheless, just go into the frappe-bench/apps/frappe directory and run git reset --hard and try updating from the frappe-bench directory again. If you get a similar error for erpnext, then run the same git command above in the erpnext app folder. This will remove all the changes in the files.