How to switch from develop to master branch?

while installing ERPNEXT i simply used “bench init” without branch so erpnext installed as developer so im stuch with it full of bugs and “bench switch-to-master” not works

Hey @5p4r70n, there is no proper master branch anymore, so the switch-to-master command has been deprecated.

You should be able to do bench switch-to-branch <branch_name> to go to a specific version (for example, to move to v12, you can run bench switch-to-branch version-12)

1 Like

yah that cammand works but while updating getting this error

File “/usr/local/lib/python2.7/dist-packages/click/”, line 1137, in invoke
return callback(*args, **kwargs)
File “/opt/bench/bench-repo/bench/commands/”, line 43, in switch_to_branch
File “/usr/local/lib/python2.7/dist-packages/click/”, line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/”, line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/”, line 555, in invoke
return callback(*args, **kwargs)
File “/opt/bench/bench-repo/bench/commands/”, line 43, in switch_to_branch
switch_branch(branch, apps=apps, bench_path=bench_path, upgrade=upgrade)
File “/opt/bench/bench-repo/bench/”, line 389, in switch_branch
version_upgrade = is_version_upgrade(app=app, bench_path=bench_path, branch=branch)
File “/opt/bench/bench-repo/bench/”, line 283, in is_version_upgrade
raise InvalidBranchException(“Specified branch of app {0} is not in upstream”.format(app)) Specified branch of app erpnext is not in upstream

I think your ERPNext git folder is only tracking one branch, which is why it can’t find version-12 (more details in your .git/config file inside your ERPNext app folder).

You could try doing:

git fetch origin version-12:refs/remotes/origin/version-12
git fetch upstream version-12:refs/remotes/upstream/version-12

And running the switch-to-branch command again.

Hope this helps!

1 Like

do i need to run " bunch start " command along with this

If you have a development setup, then yes. bench start will run all the processes necessary to start the Frappe site.