drom icon indicating copy to clipboard operation
drom copied to clipboard

Allow default git branch configuration

Open beajeanm opened this issue 3 years ago • 4 comments

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.

beajeanm avatar Apr 03 '21 12:04 beajeanm

@zapashcanon Didn't you work on something related to this issue ?

lefessan avatar Apr 10 '21 09:04 lefessan

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 ?

zapashcanon avatar Apr 10 '21 09:04 zapashcanon

I can see at least a few master occurrences in the Github workflow files, but nothing more.

lefessan avatar Apr 10 '21 11:04 lefessan

@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.

beajeanm avatar May 19 '21 10:05 beajeanm