frappe@localhost:~/frappe-bench$ bench update
INFO:bench.utils:updating bench
INFO:bench.utils:git pull
Updating a6a1ee9…b5a0290
error: Your local changes to the following files would be overwritten by merge:
playbooks/develop/includes/setup_dev_env.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 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
frappe@localhost:~/frappe-bench$
Same here, why does this happen?
You have changed files. If you aren’t developer you should not change in this case bench files.
Search several posts about this in this forum.
Do a git stash.
similar error , with NO changed files, lately bench update are plagued by error for files not changed by user. Sometime else is changing those files by itself. I don’t even know where those files are…try to update from ERPNext: v8.0.28 (master)
error: Your local changes to the following files would be overwritten by merge:
playbooks/develop/includes/setup_dev_env.yml
vm/ansible/vm.yml
I did not change any file
Use this
[in app directory]
git stash
git checkout develop
[in bench]
bench update
@MCD-50
not working`
frappe@localhost:~/frappe-bench/apps/frappe$ git stash
Saved working directory and index state WIP on master: ce8fecb Merge branch ‘hotfix’
HEAD is now at ce8fecb Merge branch ‘hotfix’
frappe@localhost:~/frappe-bench/apps/frappe$ cd ~/frappe-bench/apps/erpnext
frappe@localhost:~/frappe-bench/apps/erpnext$ git stash
Saved working directory and index state WIP on master: 50835cb Merge branch ‘hotfix’
Checking out files: 100% (4671/4671), done.
HEAD is now at 50835cb Merge branch ‘hotfix’
frappe@localhost:~/frappe-bench/apps/erpnext$ git checkout develop
Branch develop set up to track remote branch develop from upstream.
Switched to a new branch ‘develop’
frappe@localhost:~/frappe-bench/apps/erpnext$ cd ~/frappe-bench/apps/frappe
frappe@localhost:~/frappe-bench/apps/frappe$ git checkout develop
Branch develop set up to track remote branch develop from upstream.
Switched to a new branch ‘develop’
frappe@localhost:~/frappe-bench/apps/frappe$ cd ~/frappe-bench
frappe@localhost:~/frappe-bench$ bench update
INFO:bench.utils:updating bench
INFO:bench.utils:git pull
Updating a6a1ee9…b5a0290
error: Your local changes to the following files would be overwritten by merge:
playbooks/develop/includes/setup_dev_env.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 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
frappe@localhost:~/frappe-bench$
try:
cd /home/frappe/.bench
git stash
cd ~/frappe-bench
bench update
Seconded. That can lead us to, for instance, this popular solution:
that link is very helpful