The instructions for developers who create new sandbox projects on Drupal.org contradict other instructions that they should be following with respect to branch naming conventions in git, and this is leading developers to create a lot of new sandbox projects with "master" branches that should not exist.
When a developer creates a new sandbox project, the "version control" tab of that project instructs them to initialize a new git repository and then use "git push origin master" to push their code up to Drupal.org. Moreover, it does not give them any instructions on how to create branches in their sandbox that comply with Drupal's version naming conventions, e.g., "7.x-1.x." This contradicts the instructions given here:
http://drupal.org/empty-git-master
Those instructions state "the Drupal community uses major version branches (e.g., 7.x-1.x) instead" of master, "since master could be compatible with D6, D7, or even D8." They go on to instruct developers to create branches with names such as "7.x-1.x" and then delete their master branch.
It seems contradictory to first tell developers to create a master branch and then tell them later that it has no place on Drupal.org and they need to delete it. I think it would be better to instruct them to enter the following additional command after they have entered git init:
git symbolic-ref HEAD refs/heads/{{branchname}}
where {{branchname}} is "7.x-1.x" or "6.x-1.x" or whatever.
Either that, or else provide some information elsewhere in the sandbox developer instructions to get them started with correct branch naming.
Comments
Comment #1
jhodgdonMoving to correct issue queue.
Comment #2
helmo commentedThis has been fixed since then ... see #2203591: Improve instructions for empty repo and my test page https://www.drupal.org/project/2321835/git-instructions