How to commit changes

  1. I assume that the changes have been made directly to the JSON/py/js file?

  2. When you change anything in the core code, it creates an update problem as there is a difference in the commit history made locally v/s in the incoming changes. Check

  3. If you want to keep these changes, stash them and re-apply the changes.

  1. If you do not want to keep the changes, you can go to the frappe directory and reset it: git reset --hard. Or pass the reset flag when updating bench: bench update --reset

  2. When making changes, it is best to avoid code changes directly until unavoidable. For adding fields you can look at custom field option. For making server-side changes, you have the option of custom apps and server scripts, same for js changes.

1 Like