Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

git change master to main

# Step 1 
# create main branch locally, taking the history from master
git branch -m master main
# Step 2 
# push the new local main branch to the remote repo (GitHub) 
git push -u origin main
# Step 3
# switch the current HEAD to the main branch
git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/main
# Step 4
# change the default branch on GitHub to main
# https://docs.github.com/en/github/administering-a-repository/setting-the-default-branch
# Step 5
# delete the master branch on the remote
git push origin --delete master
Comment

change master to main git

$ git branch -m master main
Comment

PREVIOUS NEXT
Code Example
Shell :: apt-get install ps 
Shell :: install docker-compose ubuntu 
Shell :: find start up folder 
Shell :: how to exit git branch 
Shell :: change git url 
Shell :: install teamviewer ubuntu 20.04 
Shell :: react native run ios on specific simulator 
Shell :: pip3 uninstall all 
Shell :: restart xampp linux 
Shell :: ubuntu 20.04 install yarn 
Shell :: install idle on ubuntu 
Shell :: adb command to open deeplink 
Shell :: update python3.10 linux 
Shell :: bootstrap install for next.js 
Shell :: composer command not found ubuntu 
Shell :: jupyterlab documentation 
Shell :: inkscape ubuntu ppa 
Shell :: check if oh-my-zsh is installed 
Shell :: how to install steam on ubuntu 
Shell :: check if kubernetes is running 
Shell :: linux start mongodb 
Shell :: bash return n characters after match 
Shell :: could not find expected browser (chrome) locally. run npm install to download the correct chromium 
Shell :: Write a shell scripting program to reverse an array 
Shell :: node sass install error 
Shell :: mkv to mp4 linux 
Shell :: vim nerdtree always show hidden files 
Shell :: run heroku bash in terminal 
Shell :: kill nohup process 
Shell :: no matching key exchange method found. Their offer: diffie-hellman-group1-sha1,diffie-hellman-group14-sha1 
ADD CONTENT
Topic
Content
Source link
Name
6+4 =