Digital Marketing

Default git branch name change

Change the default git branch from master to main.


If the parent branch of your fork or branch is master, the following instructions tell you how to change the parent branch to main.

To show the parent branch, where BRANCH is the name of your branch:

Navigate to the root of your branch or fork.
Make sure your branch is the current branch (git checkout BRANCH).
Run git branch --contains.

Changing a branch parent branch from master to main

To change the parent branch for your branch to main, navigate to the root of your branch and enter the following commands, where BRANCH is the name of your branch:

   git branch -m master main
   git fetch origin
   git branch -u origin/main main
   git remote set-head origin -a
   git remote update --prune

Comments

Popular posts from this blog

Fixed WSL sshd: no hostkeys available -- exiting

PowerMTA pmta command

How to fix: mv: failed to preserve ownership