Bench update returned error


I’ve just ran bench update from v5.1.4 but returned error…

 error: Your local changes to the following files would be overwritten by merge:
    Please, commit your changes or stash them before you can merge.

Before, I’ve made little modification to this file. How to merge this so I can run bench update?


HI Jonathan_Fanny_Lie,

goto frappe-bench/app/erpnext , if you want to maintain these changes then commit them locally and then pull updates. git commit

else remove them with git stash, git stash

It has many parameters, I only use git commit -a. Is it okay? I ran bench update after that, and it worked


Just now I run bench update again, and got error:

Pull is not possible because you have unmerged files.
Please, fix them up in the work tree, and then use 'git add/rm <file>'
as appropriate to mark resolution, or use 'git commit -a'.
Error: None
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 9, in <module>
    load_entry_point('bench==0.1', 'console_scripts', 'bench')()
  File "/home/vef/bench-repo/bench/", line 56, in cli
  File "/usr/local/lib/python2.7/dist-packages/click/", line 664, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/", line 644, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/", line 991, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/", line 837, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/", line 464, in invoke
    return callback(*args, **kwargs)
  File "/home/vef/bench-repo/bench/", line 236, in update
  File "/home/vef/bench-repo/bench/", line 91, in pull_all_apps
    exec_cmd("git pull {rebase} upstream {branch}".format(rebase=rebase, branch=get_current_branch(app_dir)), cwd=app_dir)
  File "/home/vef/bench-repo/bench/", line 79, in exec_cmd
    subprocess.check_call(cmd, cwd=cwd, shell=True)
  File "/usr/lib/python2.7/", line 540, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command 'git pull  upstream master' returned non-zero exit status 1

Before I have run git commit -a before update. After this error, I run git commit -a again and then bench update ran successfully but now my sales invoice form is showing blank form… Git status shows that working directory is clean, nothing to commit again and bench update succeeded

I was doing update from 5.1.4… But If I run git stash then bench update run successfully. Sales invoice works normally.

I just made small modification to salesinvoice.js. It seemed the commit didn’t work as expected. I believe this is the cause… How to maintain this change locally?