help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: generating a git repo: main instead of master


From: tomas
Subject: Re: generating a git repo: main instead of master
Date: Sun, 13 Nov 2022 09:33:16 +0100

On Sun, Nov 13, 2022 at 09:03:25AM +0100, Uwe Brauer wrote:
> 
> Hi
> 
> It seems that more and more public repositories expect that the principal git 
> branch should be «main» instead of «master»
> 
> 
> However, the following steps in emacs lead to a git repository, where the 
> principal branch is master instead of main.

You can change the master branch name to main with

  git branch -m master main

(think "move"). It is polite to coordinate with other people who
might have cloned your repo :)

To change the default at git init

  git config --global init.defaultBranch main

(git >= 2.28)

Cheers
-- 
t

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]