Skip to content

Instantly share code, notes, and snippets.

View darrenmothersele's full-sized avatar
🏠
Working from home

Darren Mothersele darrenmothersele

🏠
Working from home
View GitHub Profile
# Steps for renaming your master branch to 'main'
# Adapted from
# https://dev.to/rhymu8354/git-renaming-the-master-branch-137b
# https://www.hanselman.com/blog/EasilyRenameYourGitDefaultBranchFromMasterToMain.aspx
#---------------------------------------------------------------------------------------------#
# A) - Steps if you have no remote / upstream
# B) - Steps if you are the repo owner and have a remote / upstream
# C) - Steps if you are using a repo where the upstream main branch has been renamed