bench.utils.CommandFailedError: git pull

root@1cpxzxc:~# cd /home/frappe/frappe-bench
root@1cpxzxc:/home/frappe/frappe-bench# bench update --reset
INFO:bench.utils:updating bench
INFO:bench.utils:git pull
Updating a1587b7…080ca17
error: Your local changes to the following files would be overwritten by merge:
bench/commands/config.py
bench/commands/git.py
bench/commands/utils.py
bench/config/common_site_config.py
bench/config/nginx.py
bench/config/redis.py
bench/config/site_config.py
bench/tests/test_setup_production.py
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 722, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 697, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 535, in invoke
return callback(*args, **kwargs)
File “/home/frappe/.bench/bench/commands/update.py”, line 35, in update
update_bench()
File “/home/frappe/.bench/bench/utils.py”, line 229, in update_bench
exec_cmd(“git pull”, cwd=cwd)
File “/home/frappe/.bench/bench/utils.py”, line 130, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: git pull

That is mean you have uncommited file.
Try to commit your changes then make bench update

Welcome Jermaine, the log reports your problem case

‘error: Your local changes to the following files would be overwritten by merge:’

A search of the forum for eg ‘bench.utils.CommandFailedError: git pull’ will give assorted posts with details and steps for you to learn what to do here.

I just face the same
Do this:

  • cd …
  • cd .bench
  • git status
  • git add --all
  • git commit -m “massage”
  • git status
  • sudo git pull
  • cd …
  • cd frappe-bench/
  • bench update