How can i update to a new version of erpnext if i made changes in app

how can i update and restore all my changes?
Can someone help me to solve this issue?

Follow the instructions or run git reset --hard and try to update again

Thanks @tundebabzy.
But i don’t want to lose my changes in app.
Is there a way of not losing it?

In that case stash your changes as instructed in the terminal. After the changes, git stash pop.

Why not create your own branch for customisations?

What did you mean by creating my own branch for customization?
thanks for your support @tundebabzy

I’ll recommend that you learn git. Try Set up Git - GitHub Docs or https://git-scm.com/docs/gittutorial

1 Like

The best practice for customizing Erpnext is to put all your customization in an app by taking advantage of hooks, this way updating Erpnext won’t affect your changes.

2 Likes

Hi @Elie
Did you create a customize App or did you change the Code under Frappe/Erpnext?? If you create your own app as @tundebabzy mention than you have to do this:

  1. cd /home/frappe/frappe-bench/apps/frappe
  2. git stash
  3. cd /home/frappe/frappe-bench
  4. bench update

But if your App was including changing .py and .js under frappe and erpnext than you have to pause and read this Frappe Framework Tutorial

Hi @sione
I added fields in the doctype and i added in the dashboard of the customer doctype.
Do you know how can i backup and update?
Thanks for your help.

Hi @tundebabzy @ganas .
I learn git but it didn’t help me.
I modified in the doctype and in the dashboard.
any help?