Bench update fails

Bench update fails, please help

[frappe@test2 frappe-bench]$ bench update --force
INFO:bench.utils:updating bench
INFO:bench.utils:git pull
Updating e3fa8c4…2f03e9f
error: Your local changes to the following files would be overwritten by merge:
Please, commit your changes or stash them before you can merge.
Traceback (most recent call last):
File “/usr/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/home/frappe/.bench/bench/”, line 40, in cli
File “/usr/lib64/python2.7/site-packages/click/”, line 722, in call
return self.main(*args, **kwargs)
File “/usr/lib64/python2.7/site-packages/click/”, line 697, in main
rv = self.invoke(ctx)
File “/usr/lib64/python2.7/site-packages/click/”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/lib64/python2.7/site-packages/click/”, line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/lib64/python2.7/site-packages/click/”, line 535, in invoke
return callback(*args, **kwargs)
File “/home/frappe/.bench/bench/commands/”, line 35, in update
File “/home/frappe/.bench/bench/”, line 229, in update_bench
exec_cmd(“git pull”, cwd=cwd)
File “/home/frappe/.bench/bench/”, line 130, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: git pull

Hi @JAGwar1905
Refer this thread



1 Like

Updates for ERPNext continue to be a little delicate. If you don’t absolutely need an update, then stay on your version. Most of our users are on v6 and its very reliable still, very smooth, one client even requested we keep them on v6 when we demonstrated v7. One client is still on v4! and its just perfect for them; the interface of v4 is still an absolute beauty.

You may end up with internal server error messages and an unusable system.

For your needs though; run git stash against frappe-bench/apps/frappe and against /erpnext. Then run git fetch, then git pull against these 2 folders. afterwards; run bench migrate; then bench update --patch.

If you have nagging errors due to changes try bench update --reset to force your changes to be overwritten.

You may be lucky.