From: "Antoine Beaupré" <anarcat@debian.org>
To: Felipe Contreras <felipe.contreras@gmail.com>, git@vger.kernel.org
Subject: RE: how to rename remote branches, the long way
Date: Fri, 23 Apr 2021 21:12:51 -0400 [thread overview]
Message-ID: <87k0osfpt8.fsf@angela.anarc.at> (raw)
In-Reply-To: <60836fa129078_ff602089c@natae.notmuch>
On 2021-04-23 20:08:49, Felipe Contreras wrote:
> Antoine Beaupré wrote:
>> Before people start throwing things (like `git push origin oldref:newref
>> :oldref`) at me, consider that I've been beating my head against this
>> for a while, and everywhere I look basically suggests this:
>>
>> git branch -m to_branch
>> git push origin from_branch:to_branch :from_branch
>
> Better:
>
> git push origin from_branch:to_branch :from_branch &&
> git branch -m from_branch to_branch
How so?
>> I wrote this primarily with the "master to main" migration, because a
>> bunch of projects (including mine) are suddenly, actually migrating
>> their main branch from master to main. Personnally, it's because I'm
>> tired of being yelled "master" from my shell prompt all the time, but
>> naturally, I guess opinions on the matter vary.
>
> Just tell git to stop bothering you:
>
> git config --global init.defaultbranch master
I think you misunderstood me; I am tired of seeing the name "master"
everywhere. I actually did this, when it started working:
git config --global init.defaultbranch main
And the reason I wrote this is to fix legacy.
A.
--
In god we trust, others pay cash.
- Richard Desjardins, Miami
next prev parent reply other threads:[~2021-04-24 1:12 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-24 0:22 how to rename remote branches, the long way Antoine Beaupré
2021-04-24 1:08 ` Felipe Contreras
2021-04-24 1:12 ` Antoine Beaupré [this message]
2021-04-24 3:44 ` Felipe Contreras
2021-04-24 15:05 ` Antoine Beaupré
2021-04-29 0:23 ` Felipe Contreras
2021-04-24 18:24 ` brian m. carlson
2021-04-29 0:28 ` Felipe Contreras
2021-04-24 17:38 ` brian m. carlson
2021-04-24 18:03 ` Antoine Beaupré
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k0osfpt8.fsf@angela.anarc.at \
--to=anarcat@debian.org \
--cc=felipe.contreras@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).