Re: Renaming the "master" branch without breaking existing clones
From: Taylor Blau <hidden>
Date: 2020-08-03 16:40:02
On Mon, Aug 03, 2020 at 09:19:52AM -0700, Junio C Hamano wrote:
Taylor Blau [off-list ref] writes:quoted
I am a little uncomfortable with the idea that a 'git pull' would modify 'refs/{heads,tags}' in addition to 'refs/remotes'.Those who want to rename their own branches should be allowed to do so easily when it is convenient for them to do so, whether the reason for renaming their local branch is because their upstream renamed the branches they are interested in and have good reasons to use the same name, or because they made a typo when they created their local brnach, but I do not think renaming the local branch should be done automatically.
I agree that doing so automatically would not be welcome. I like your idea in this thread about doing so with a small helper script. I would even be OK with something in contrib that understands '--dry-run' (to print what it would have done) and '--all' (to rename all tracking refs at once). Thanks, Taylor