git change default master branch code example Example: change git default branch git config --global init.defaultBranch <defaultBranchName>