Error while upgrading

Hi there,
I am trying to update my application erpnext and frappe. and i am unable to do so.
can anyone provide steps for it.?
i tried to do bench update.
but raising error.

i ll paste the traceback for the same.

error: Your local changes to the following files would be overwritten by merge:
frappe/core/doctype/role/role.json
frappe/core/doctype/user/user.json
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/maverik/.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/maverik/.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/maverik/.bench/bench/commands/update.py”, line 78, in _update
pull_all_apps(bench_path=bench_path, reset=reset)
File “/home/maverik/.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/maverik/.bench/bench/utils.py”, line 127, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: git pull upstream develop

But i havent made any changes in these doctypes so why this error?

you have some unstaged changes in frappe app, commit the changes first then try to update

Thanks, Makarand

I solved the issue with git reset hard
But now i am facing problem in erpnext.
I have changed certain doctypes in erpnext and also have some custom added doctypes.
So how Can i Solve the issue?
There are some files in which i havent even changed anything still raises error for changes.
What can be wrong?

Traceback

Automatic merge failed; fix conflicts and then commit the result.
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/home/maverik/.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/maverik/.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/maverik/.bench/bench/commands/update.py”, line 78, in _update
pull_all_apps(bench_path=bench_path, reset=reset)
File “/home/maverik/.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/maverik/.bench/bench/utils.py”, line 127, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: git pull upstream develop

Please provide me steps for updating my apps.

I am facing the same issues…
Any help?