mikemccand / luceneutil

Various utility scripts for running Lucene performance tests
Apache License 2.0
203 stars 113 forks source link

rename master branch in git #179

Open msokolov opened 2 years ago

msokolov commented 2 years ago

What would it take to rename this branch? Does anything rely on the name, aside from people's existing checkouts? I think we could just create a new branch named say "main" and delete "master"? Then people's checkouts will be tracking a nonexistent remote branch, and they will have to fix that.

mikemccand commented 2 years ago

+1!

We probably need a small fix to nightlyBench.py, where it pulls updates before running each night, and also where it generates URLs to see code changes since the last run in the charts, but otherwise this shouldn't be a big deal?

Maybe developers will have to re-clone to switch to the new name? Not sure.

msokolov commented 2 years ago

I think developers could switch by:

> git fetch
... get the new main branch
> git branch -m main
> git branch --set-upstream-to origin/main
> git prune
... remove local references to the deleted upstream branch? maybe?
msokolov commented 2 years ago

hmm your mention of URLs in charts makes me wonder if we shouldn't keep the master branch around even if it's deprecated. Maybe there are published charts with URLs containing the branch name in them somewhere? Or -- wouldn't they be more likely to have the commit ids?

msokolov commented 2 years ago

My fork shows a "rename" button here: https://github.com/msokolov/luceneutil/branches maybe yours would do that for you?