astropy / package-template

Template for packages that use Astropy. Maintainer: @astrofrog
http://docs.astropy.org/projects/package-template/en/latest/
Other
60 stars 63 forks source link

Rename master branch to something else? #421

Closed pllim closed 1 year ago

pllim commented 5 years ago

My muscle memory keeps doing git fetch upstream master followed by git rebase upstream/master, then bad things happen because I am working off cookiecutter branch. Can we rename master to master-old or master-py3 or something else? 😬

bsipocz commented 5 years ago

The messing with the master not the default branch should end up on a faq somewhere, in the list of "don't do it as it causes more issues than it solves". As I recall the arguing for keeping it master rather than rendered was that this case the old ways would still work for folks who have muscle memory, or can find the affiliated package related docs in one of the old versions of astropy (as that docs since disappeared). 🤷‍♀

So I think you have a valid point, but I don't know what's the best way forward.

nstarman commented 4 years ago

Is the branch "master" just the cookiecutter branch run with a preset list of answers?

bsipocz commented 4 years ago

yes, master was only kept for backward compatibility, and is a rendered version from the cookiecutter.

nstarman commented 4 years ago

Could that rendering be done with a custom GitHub action? Then anyone forking the repository could easily add that action to their repository and have a rendering that reflects their changes.

nstarman commented 4 years ago

Also, I agree that rendered is a less confusing name than master.

bsipocz commented 4 years ago

The rendering to the master branch was to provide a backward compatible way for folks who used the template before it started to use cookiecutter.

I don't understand how a github action come into play with this, the repo was never meant to be used by forking, etc. And renaming was rejected as it didn't provide the necessary backward compatibility that was required at the time when the default branch name, and thus muscle memory was almost exclusively master (see my original comment). Things has changed since then, users might not get upset now when not finding a master branch in a repo any more, so renaming to rendered is more reasonable than it would have been 2 years ago.

nstarman commented 4 years ago

Makes sense about the naming.

WIth regards to automatic rendering, this is related to #480 . Having an up-to-date rendering would allow GitHub repo generation using GitHub's template mechanism. I had an old template https://github.com/nstarman/template_project that I deprecated in favor of using this project. However, one of the very convenient features was the one-click setup in GitHub, using the GitHub template dropdown option. Adding an Action that can likewise be added to repository forks would make the GitHub template experience possible.

nstarman commented 4 years ago

I think this discussion should be moved to #480. Do you mind if I drop some quotes from here to there ?

bsipocz commented 4 years ago

FYI the rendering is up-to-date.

nstarman commented 4 years ago

Thanks. I was wondering about that. But is this handled manually?

pllim commented 3 years ago

GitHub now defaults to main for new repos and @tepickering updated the default branch name in #449 . So we can close this?