Updating bench failed - CommandFailedError: git pull

Hi Community,

I would like to update my ERPNext operating version. When I run command “update bench” the system throws an error below. Please advise. Thanks.

frappe@ip-172-31-34-123:~/frappe-bench$ bench --version

4.1.0
frappe@ip-172-31-34-123:~/frappe-bench$ bench update
INFO:bench.utils:updating bench
INFO:bench.utils:git pull
Updating 9c834bc…8de6f0d
error: Your local changes to the following files would be overwritten by merge:
.gitignore
.travis.yml
bench/commands/install.py
bench/commands/utils.py
bench/config/templates/Procfile
bench/package.json
bench/patches/patches.txt
playbooks/init.py
playbooks/develop/includes/setup_bench.yml
playbooks/develop/includes/setup_dev_env.yml
playbooks/develop/includes/setup_erpnext.yml
playbooks/develop/includes/setup_selinux_policy.yml
playbooks/develop/install.yml
playbooks/develop/macosx.yml
playbooks/develop/templates/mariadb_centos.repo
playbooks/prerequisites/debian.yml
playbooks/prerequisites/files/debian_mariadb_config.cnf
playbooks/prerequisites/files/mariadb_config.cnf
playbooks/prerequisites/files/nginx.conf
playbooks/prerequisites/install_prerequisites.yml
playbooks/prerequisites/install_roles.yml
playbooks/prerequisites/roles/bash_screen_wall/files/screen_wall.sh
playbooks/prerequisites/roles/bash_screen_wall/tasks/main.yml
playbooks/prerequisites/roles/dns_caching/handlers/main.yml
playbooks/prerequisites/roles/dns_caching/tasks/main.yml
playbooks/prerequisites/roles/fail2ban/defaults/main.yml
playbooks/prerequisites/roles/fail2ban/handlers/main.yml
playbooks/prerequisites/roles/fail2ban/tasks/configure_nginx_jail.yml
playbooks/prerequisites/roles/fail2ban/tasks/main.yml
playbooks/prerequisites/roles/fail2ban/templates/nginx-proxy-filter.conf.j2
playbooks/prerequisites/roles/fail2ban/templates/nginx-proxy-jail.conf.j2
playbooks/prerequisites/roles/frappe_selinux/files/frappe_selinux.te
playbooks/prerequisites/roles/frappe_selinux/tasks/main.yml
playbooks/prerequisites/roles/locale/defaults/main.yml
playbooks/prerequisites/roles/locale/tasks/main.yml
playbooks/prerequisites/roles/logwatch/defaults/main.yml
playbooks/prerequisites/roles/logwatch/tasks/main.yml
playbooks/prerequisites/roles/logwatch/templates/logwatch.conf.j2
playbooks/prerequisites/roles/mariadb/README.md
playbooks/prerequisites/roles/mariadb/defaults/main.yml
playbooks/prerequisites/roles/mariadb/handlers/main.yml
playbooks/prerequisites/roles/mariadb/meta/main.yml
playbooks/prerequisites/roles/mariadb/tasks/centos.yml
playbooks/prerequisites/roles/mariadb/tasks/debian.yml
playbooks/prerequisites/roles/mariadb/tasks/main.yml
playbooks/prerequisites/roles/mariadb/tasks/mysql_secure_installation.yml
playbooks/prerequisites/roles/mariadb/tasks/ubuntu.yml
playbooks/prerequisites/roles/mariadb/templates/mariadb_centos.repo.j2
playbooks/prerequisites/roles/mariadb/templates/mariadb_ubuntu.list.j2
playbooks/prerequisites/roles/mariadb/templates/my.cnf.j2
playbooks/prerequisites/roles/mariadb/vars/main.yml
playbooks/prerequisites/roles/nginx/.travis.yml
playbooks/prerequisites/roles/nginx/README.md
playbooks/prerequisites/roles/nginx/defaults/main.yml
playbooks/prerequisites/roles/nginx/handlers/main.yml
playbooks/prerequisites/roles/nginx/meta/main.yml
playbooks/prerequisites/roles/nginx/tasks/main.yml
playbooks/prerequisites/roles/nginx/tasks/setup-Debian.yml
playbooks/prerequisites/roles/nginx/tasks/setup-RedHat.yml
playbooks/prerequisites/roles/nginx/tasks/vhosts.yml
playbooks/prerequisites/roles/nginx/templates/nginx.conf.j2
playbooks/prerequisites/roles/nginx/templates/nginx.repo.j2
playbooks/prerequisites/roles/nginx/templates/vhosts.j2
playbooks/prerequisites/roles/nginx/tests/inventory
playbooks/prerequisites/roles/nginx/tests/test.yml
playbooks/prerequisites/roles/nginx/vars/Debian.yml
playbooks/prerequisites/roles/nginx/vars/RedHat.yml
playbooks/prerequisites/roles/nodejs/tasks/main.yml
playbooks/prerequisites/roles/ntpd/tasks/main.yml
playbooks/prerequisites/roles/psutil/tasks/main.yml
playbooks/prerequisites/roles/supervisor/tasks/main.yml
playbooks/prerequisites/roles/swap/defaults/main.yml
playbooks/prerequisites/roles/swap/tasks/main.yml
playbooks/prerequisites/roles/wkhtmltopdf/tasks/main.yml
playbooks/prerequisites/setup_essentials.yml
playbooks/prerequisites/setup_nginx_proxy_jail.yml
playbooks/prerequisites/ubuntu.yml
playbooks/production/includes/setup_bench_pro
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 34, in update
update_bench()
File “/home/frappe/.bench/bench/utils.py”, line 272, in update_bench
exec_cmd(“git pull”, cwd=cwd)
File “/home/frappe/.bench/bench/utils.py”, line 142, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: git pull
frappe@ip-172-31-34-123:~/frappe-bench$

check these for ideas https://discuss.erpnext.com/search?q=bench.utils.CommandFailedError%3A%20git%20pull