Bench update strange error

Hello, running bench update gives me this error

bench update
Already up-to-date.
restarting 
From https://github.com/frappe/shopping-cart
 * branch            develop    -> FETCH_HEAD
Already up-to-date.
From https://github.com/frappe/erpnext
 * branch            develop    -> FETCH_HEAD
Already up-to-date.
From https://github.com/frappe/frappe
 * branch            develop    -> FETCH_HEAD
Updating 26f1cc8..fbf3f14
error: Your local changes to the following files would be overwritten by merge:
	frappe/patches/v4_2/refactor_website_routing.py
Please, commit your changes or stash them before you can merge.
Aborting
Error: None
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 9, in <module>
    load_entry_point('bench==0.1', 'console_scripts', 'bench')()
  File "/home/erpnext/bench-repo/bench/cli.py", line 36, in cli
    return bench()
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 610, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 590, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 936, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 782, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 416, in invoke
    return callback(*args, **kwargs)
  File "/home/erpnext/bench-repo/bench/cli.py", line 161, in update
    pull_all_apps()
  File "/home/erpnext/bench-repo/bench/app.py", line 64, in pull_all_apps
    exec_cmd("git pull {rebase} upstream {branch}".format(rebase=rebase, branch=get_current_branch(app_dir)), cwd=app_dir)
  File "/home/erpnext/bench-repo/bench/utils.py", line 61, in exec_cmd
    subprocess.check_call(cmd, cwd=cwd, shell=True)
  File "/usr/lib/python2.7/subprocess.py", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'git pull  upstream develop
' returned non-zero exit status 1

Looks quite strange to me. Never experienced it before.

frappe/patches/v4_2/refactor_website_routing.py has some changes (which you may safely discard).
Run,

cd apps/frappe
git reset --hard
cd -
bench update
2 Likes

Thx this worked