

Renaming of branch can be done by Git Admins. This blog captures the steps to rename the branch and change the default branch name to new renamed branch. So recently I've renamed one of my repo's default branch from master to main. Note: this will affect other branches, also. To have all your repos branches push to the branch that they pull from, use: git config -local fault upstream. The git branch command does more than just create and delete branches.
#Git rename branch master to main code#
Steps to rename the other users local repoĪs part of adopting the Open Source Inclusive Naming Initiative, it is recommended to change the default branch name from master to main in Source Code Management tools. 18 hours ago &0183 &32 Two options: push all branches to where they get pulled from via fault.

Step 4 Finally delete the master branch from remote.Another great option for your main github branch is 'latest.' The goal is to just be unambiguous.
NOTE: Changing the default branch to 'main' also has the benefit of starting with 'ma' so that autocomplete
