Error while trying to update bench

user@erpnext:/home/frappe/frappe-bench$ sudo bench update
INFO:bench.utils:updating bench
Updating b07de26…164bc13
error: Your local changes to the following files would be overwritten by merge:
bench/patches/v4/update_node.py
playbooks/develop/ubuntu.yml
Please, commit your changes or stash them before you can merge.
Aborting
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/home/frappe/.bench/bench/cli.py”, line 40, in cli
bench_command()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 716, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 696, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 534, in invoke
return callback(*args, **kwargs)
File “/home/frappe/.bench/bench/commands/update.py”, line 34, in update
update_bench()
File “/home/frappe/.bench/bench/utils.py”, line 227, in update_bench
exec_cmd(“git pull”, cwd=cwd)
File “/home/frappe/.bench/bench/utils.py”, line 127, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: git pull

I have hosted it on Google Cloud using Ubuntu 16.04
What am I doing wrong?

EDIT: This behavior is happening after passing drop-site command.

You have made few changes to the standard modules , if you want the modifications then add them

git add .

or if you dont want use git stash before you do bench update

Thanks for such a fast reply. I have not done any modifications on my own. I just passed a drop-site command for site1.local. Can you just direct me which directory do I pass git stash from?

1 Like

I found the solution. I had to cd to frappe/.bench before passing git stash. Thank you so much!

1 Like