drom
drom copied to clipboard
Allow default git branch configuration
The GitHub skeleton hardcodes the default branch to master
while Github allows the branch to be named something else.
As far as I know, this is an issue only for the workflows which are only triggered when push to master happens.
Drom could have an optional key (git-default-branch
?) to allow setting it to something else.
I'd be happy to give it a try if there is some documentation on how variables substitution work in drom.
@zapashcanon Didn't you work on something related to this issue ?
What we did was just to remove the hint:
astuce: Utilisation de 'master' comme nom de la branche initiale. Le nom de la branche
astuce: par défaut peut changer. Pour configurer le nom de la branche initiale
astuce: pour tous les nouveaux dépôts, et supprimer cet avertissement, lancez :
astuce:
astuce: git config --global init.defaultBranch <nom>
astuce:
astuce: Les noms les plus utilisés à la place de 'master' sont 'main', 'trunk' et
astuce: 'development'. La branche nouvellement créée peut être rénommée avec :
astuce:
astuce: git branch -m <nom>
@beajeanm you can use the branch name you want when creating a new project (you have to set init.defaultBranch
correctly in your git config).
But it's possible that master
is hard coded in some places, if so, could you tell us which ones so we can have a look ?
I can see at least a few master
occurrences in the Github workflow files, but nothing more.
@zapashcanon yes, the actual branch is fine, drom is respecting the default branch as you suggest. @lefessan is right, the Github workflow files have master hardcoded, and I think that were we would need a config option.