Update error in digital ocean

I have installed erpnext onto digitalocean.

I’m trying to do an update and I get this error:

$ bench update
INFO:bench.utils:updating bench
Already up-to-date.
Requirement already satisfied: Pillow in ./env/lib/python2.7/site-packages
INFO:bench.app:pulling frappe
From GitHub - frappe/frappe: Low code web framework for real world applications, in Python and Javascript

  • branch master → FETCH_HEAD
    Already up-to-date.
    INFO:bench.app:pulling erpnext
    From GitHub - frappe/erpnext: Free and Open Source Enterprise Resource Planning (ERP)
  • branch master → FETCH_HEAD
    Updating de93291…8650855
    error: Your local changes to the following files would be overwritten by merge:
    erpnext/init.py
    erpnext/accounts/doctype/account/account_tree.js
    erpnext/accounts/doctype/payment_entry/payment_entry.py
    erpnext/accounts/doctype/payment_request/payment_request.json
    erpnext/accounts/doctype/pricing_rule/pricing_rule.py
    erpnext/accounts/doctype/purchase_invoice/purchase_invoice.js
    erpnext/accounts/doctype/sales_invoice/pos.py
    erpnext/accounts/doctype/sales_invoice/sales_invoice.js
    erpnext/accounts/doctype/tax_rule/tax_rule.json
    erpnext/accounts/report/financial_statements.py
    erpnext/accounts/report/purchase_register/purchase_register.py
    erpnext/buying/doctype/quality_inspection/quality_inspection.py
    erpnext/buying/report/quoted_item_comparison/quoted_item_comparison.py
    erpnext/controllers/item_variant.py
    erpnext/hr/doctype/process_payroll/process_payroll.js
    erpnext/hr/doctype/salary_slip/salary_slip.js
    erpnext/hr/doctype/salary_slip/salary_slip.py
    erpnext/hr/doctype/salary_slip/test_records.json
    erpnext/hr/doctype/salary_slip/test_salary_slip.py
    erpnext/hr/doctype/salary_structure/test_salary_structure.py
    erpnext/hr/report/employee_information/employee_information.json
    erpnext/hr/report/monthly_salary_register/monthly_salary_register.py
    erpnext/patches.txt
    erpnext/patches/v6_16/update_billing_status_in_dn_and_pr.py
    erpnext/projects/doctype/timesheet/timesheet.py
    erpnext/projects/report/project_wise_stock_tracking/project_wise_stock_tracking.json
    erpnext/public/js/utils.js
    erpnext/selling/doctype/customer/customer.py
    erpnext/selling/doctype/customer/test_customer.py
    erpnext/setup/doctype/email_digest/email_digest.py
    erpnext/setup/doctype/sms_settings/sms_settings.py
    erpnext/stock/doctype/item/item.json
    erpnext/stock/doctype/item/item.py
    erpnext/stock/doctype/item/test_item.py
    erpnext/stock/doctype/item_attribute/item_attribute.py
    erpnext/stock/doctype/warehouse/test_warehouse.py
    erpnext/stock/doctype/warehouse/warehouse.py
    erpnext/stock/get_item_details.py
    erpnext/stock/report/item_shortage_report/item_shortage_report.json
    erpnext/stock/report/item_wise_price_list_rate/item_wise_price_list_rate.json
    erpnext/stock/report/serial_no_service_contract_expiry/serial_no_service_contract_expiry.json
    erpnext/stock/report/serial_no_status/serial_no_status.json
    erpnext/stock/report/serial_no_warranty_expiry/serial_no_warranty_expiry.json
    erpnext/support/doctype/warranty_claim/warranty_claim.json
    erpnext/utilities/doctype/address/address.py
    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 716, in call
    return self.main(*args, **kwargs)
    File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 696, in main
    rv = self.invoke(ctx)
    File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
    File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
    File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 534, in invoke
    return callback(*args, **kwargs)
    File “/home/frappe/.bench/bench/commands/update.py”, line 62, in update
    _update(pull, patch, build, bench, auto, restart_supervisor, requirements, no_backup, upgrade, force=force, reset=reset)
    File “/home/frappe/.bench/bench/commands/update.py”, line 78, in _update
    pull_all_apps(bench_path=bench_path, reset=reset)
    File “/home/frappe/.bench/bench/app.py”, line 146, in pull_all_apps
    remote=remote, branch=get_current_branch(app, bench_path=bench_path)), cwd=app_dir)
    File “/home/frappe/.bench/bench/utils.py”, line 127, in exec_cmd
    raise CommandFailedError(cmd)
    bench.utils.CommandFailedError: git pull upstream master

I dont need any changes as I don’t think I made any changes.

I followed this: Bench Update Error New - bench.utils.CommandFailedError: git pull - #10 by Ashish_Dhingra

I did these commands:

sudo chown -R frappe:frappe /home/frappe/.bench
sudo chown -R frappe:frappe /home/frappe/frappe-bench
cd /home/frappe/.bench
git reset --hard
git pull
cd /home/frappe/frappe-bench
bench update

but the same result happens

Hi, but I think your changes in the erpnext folder
cd home/frappe/frappe-bench/apps/erpnext git status

and if it is not your changes run
git reet --hard and try again bench update

thanks for the help.