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 :: pm2 adonisjs 
Shell :: copy folders linux 
Shell :: terminal delete directory not empty 
Shell :: curl: (7) Failed to connect to localhost port 9200: Connection refused 
Shell :: bash get time milliseconds 
Shell :: git stash unstage cahnges 
Shell :: ! [rejected] main - main 
Shell :: raspberry pi install firefox 
Shell :: change owner of all the files from a directory linux 
Shell :: install zsh 
Shell :: zip files in folder linux 
Shell :: edit iptables 
Shell :: multiple git stashes 
Shell :: set root password kali 
Shell :: ubuntu screenshot tool 
Shell :: install nativescript version 6 
Shell :: move running terminal process to background linux 
Shell :: wslconfig 
Shell :: replace substring in bash 
Shell :: centos copy files ssh 
Shell :: batch write to text file 
Shell :: git checkout branch from remote to local 
Shell :: undo last commit git 
Shell :: linux export path 
Shell :: make executable bash script 
Shell :: get your ip address from terminal 
Shell :: kubernetes delete everything 
Shell :: composer install global 
Shell :: git diff with remote branch 
Shell :: packet tracer ubuntu 
ADD CONTENT
Topic
Content
Source link
Name
1+9 =