Skip to main content

How to set default branch name created by 'git intit'

CommandDescription
git remote set-head origin -apoint origin/HEAD to default branch of remote repository(-a is --auto)
git remote set-head origin devpoint origin/HEAD to (origin/dev)
git remote set-head origin -ddelete origin/HEAD
tip

HEAD always points to last committed repository,so it will automatically change.