I want to change my master
branch to release
, both locally and remote (on github). I know there is a question exactly for this, here an stackoverflow. My case is different, I've used git-flow
, and there seems some cruft on github/in the git...as:
git branch -m master release
works like a charm. but then:
git push -u origin release
gets me a
Total 0 (delta 0), reused 0 (delta 0)
To github.com:benzkji/django-painless-redirects.git
! [remote rejected] release -> release (cannot lock ref 'refs/heads/release': 'refs/heads/release/0.3.5' exists; cannot crea 'refs/heads/release')
As far as I can tell, either this was by my bad (pushing a release branch created by git-flow
to github, somewhen in the past), or this is by design, because the tag 0.3.5
was on the release
branch...anyway, I dont know a way to solve this (rename an already deleted branch?! woot)
Maybe important: master
is currently not the default branch on github, this is develop
.
Credits - I've got the two basic lines from Scott: https://www.hanselman.com/blog/EasilyRenameYourGitDefaultBranchFromMasterToMain.aspx