The only way how the github default branch could be implemented – was changing the HEAD ref. The structural way how capistrano without an explicit branch set would work – is using a HEAD ref, as master is just a convention (best practice). When you think about it that way – it all makes sense. One thing led to another. No Magic.So lessons learned:
# When referencing "head", use the branch we want to deploy or, by # default, Git's reference of HEAD (the latest changeset in the default # branch, usually called "master"). def head variable(:branch) || 'HEAD' end
- never underestimate a delivery and do it only with a good QA coverage, even if it’s JUST 1 symbol patch;
- use bookmarks to the what ever branch on the github page you like, and leave the default branch untouched;
- when deciding to change it – make sure your deploy script is branch aware;
- being used to git master branch and default patterns of using git – a good point is to re-read the documentation.