Bench Update Error : Specified branch of app frappe is not in upstream

Hi Guys,
I am getting the following error when I am run bench update

Traceback (most recent call last):
  File "/usr/local/bin/bench", line 9, in <module>
    load_entry_point('bench', 'console_scripts', 'bench')()
  File "/home/erpnext/thinksmart/bench-repo/bench/cli.py", line 40, in cli
    bench_command()
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 722, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 697, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1066, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 895, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 535, in invoke
    return callback(*args, **kwargs)
  File "/home/erpnext/thinksmart/bench-repo/bench/commands/update.py", line 51, in update
    version_upgrade = is_version_upgrade()
  File "/home/erpnext/thinksmart/bench-repo/bench/app.py", line 185, in is_version_upgrade
    raise InvalidBranchException("Specified branch of app {0} is not in upstream".format(app))
bench.app.InvalidBranchException: Specified branch of app frappe is not in upstream

How can I solve this issue?
Thanks in advance.

Have you created any git branches in frappe app folder?

Hi @ninjas005

Seems Frappe application is not on the Master branch, can you run the command git branch under apps/frappe/ directory and share the output

1 Like

@Basawaraj_Savalagi : Yes , I’ve created some branches. I had to make the newsletter work a little different. So I made a branch (newsletter) and made some customizations and made a remote repo in github then changed url of git origin in frappe directory.

@rohit_w : Thanks, I checkout master , merged my branch (newsletter) - ran bench update again. It Worked… :open_mouth:

But how??? Why can’t I use my own branch instead of master. I don’t want my experiments in the master branch.

1 Like

You can checkout your newsletter branch after bench update is complete

Could you please explain that a little more?
If I am right , then
After the 1st step installation, the frappe branch will be master in prod server.
I have a new doctype in my branch and I’ve checked out my branch in the production server. In order to get this new doctype created, I’ve to run the bench update right?, or bench uninstall-app frappe and then bench install-app frappe commands will do the magic?

I have faced this problem.
And the solution was just renaming my remote branch to upstream.
git remote rename origin upstream :grinning:

1 Like