Cannot proceed with update: You have local changes in app "frappe" that are not committed

same situation here,
bench update --reset ist working.

but without --reset no success.

1 Like

Hello is happening again.
I run the code as before, but this time it’s not working.

The code

Then i do bench update

I have a few issues in my version that was fixed and I need to update urgent. Any help please.

It’s not updating am getting this error

Am not able to save anything.

Try this

in apps/frappe

git stash (it will says No local changes to save)
git reset --hard
git pull --rebase
git stash
git add . (Including point)

in frappe-bench

bench update

this work for me …

4 Likes

This work for me 2 thank you.

Thank you. I expected this to work, but unfortunately it still doesn’t. Maybe anyone can confirm that.

This is how it should work:

cd /home/frappe/frappe-bench/apps/frappe
git stash

cd /home/frappe/frappe-bench/apps/erpnext
git stash

cd /home/frappe/frappe-bench
bench update --reset

That should work.

2 Likes

Hello Jermaine_Gray,

of course, with --reset it works. Without it doesn’t, so your suggestion is more a workaround than a solution.

If you run bench update the next time, you will see the same message like before:

Cannot proceed with update: You have local changes in app "erpnext" that are not committed.

Here are your choices:

1. Merge the erpnext app manually with "git pull" / "git pull --rebase" and fix conflicts.
1. Temporarily remove your changes with "git stash" or discard them completely
	with "bench update --reset" or for individual repositries "git reset --hard"
2. If your changes are helpful for others, send in a pull request via GitHub and
	wait for them to be merged in the core.

Thank for your feedback.
I know it a workaround. Still look for a solution.

I am close to a solution. Actually, I found a solution already.

  1. Go to the directory, either frappe-bench/apps/erpnext or frappe-bench/apps/frappe
  2. Type git status
  3. Check the list of the untracked files. There might be files, which do or don’t belong there.
  4. Type git add --all to track those files
  5. Type git stash
  6. Run bench update
  7. It should run successfully, if not, start over with 1. and repeat for the other directory

On this point you’re already done, but you may want to apply your changes, which you stashed. So continue with 8. if you stashed things, which you consider important.

8 . While you’re still in the folder, either frappe-bench/apps/erpnext or frappe-bench/apps/frappe type git stash apply

Your changes will be applied again, but on the next run, you will run into the same issue like you had before.

So 1. - 7. was the solution we were looking for.

Maybe someone can tell, why “print formats” and “support/web forms” are breaking bench update. These are my files:

erpnext/accounts/print_format/nameofsomeguy/__init__.py
erpnext/accounts/print_format/nameofsomeguy/nameofsomeguy.json
erpnext/accounts/print_format/nameofsomeotherguy/__init__.py
erpnext/accounts/print_format/nameofsomeotherguy/nameofsomeotherguy.json
erpnext/support/web_form/contact/__init__.py
erpnext/support/web_form/contact/contact.js
erpnext/support/web_form/contact/contact.json
erpnext/support/web_form/contact/contact.py
11 Likes

Thank you @ci2016 … finally work for me!

1 Like

You’re welcome. I am happy to help!

than k you very much. it working for me.

thank you very much, it work for me.

Hi all,
Can someone guide me how to upgrade when you actually have changed some file?
I’m using Google Maps with Location Distance Integration Tutorial
So I have changed frappe/hooks.py

How to proceed now? I’m not experienced with git, but am I right to assume to do:
git stash
bench update
git stash apply
How does that work? Will git stash store my changes and after update will it merge into the new file? Or will it overwrite new file with the one I stashed? I’m worried I might lose the new features if the latter is true. Sorry I know this is really git related but I hope this might help more users.

‘How to proceed now?’

A search like ‘git stash apply’ will point the forward way here…

For eg this may help you Bench update showing error

Some recent experience:

Updated from 10.0.5 to 10.0.8 and got same error.

Ran bench update -reset and then updated it again, and it worked out just fine.

I don’t know if I had any customization done, pretty new to ERPNext in that aspect.

I had this error because my locales in terminal was not in en_US.

Try to set locales as english or you could try like this : “LANG=en_US bench …”

Regards.

I had the same error and the answer did not fix it.
bench update --reset did fix it.