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 :: check ffmpeg version command 
Shell :: yum install node 
Shell :: not digitally signed. you cannot run this script on the current system 
Shell :: install nano ubuntu 
Shell :: deactivate base conda 
Shell :: reload ssh config 
Shell :: ubuntu see port usage 
Shell :: xampp starting apache...fail. ubuntu 20.04 
Shell :: permission denied running shell script 
Shell :: no upgrade brew 
Shell :: › Error: Missing required flag: › -a, --app APP app to run command against › See more help with --help 
Shell :: how to check folder size in linux 
Shell :: Error starting userland proxy: listen tcp4 0.0.0.0:8080: bind: address already in use 
Shell :: bash: pip: command not found 
Shell :: docker: Error response from daemon: dial unix docker.raw.sock: connect: no such file or directory 
Shell :: git push to another remote branch overwrite 
Shell :: ubuntu list users 
Shell :: datetime echo shell script 
Shell :: install postman in ubuntu 
Shell :: hardhat 
Shell :: install qwebengineview pyqt5 
Shell :: conda install shapely 
Shell :: uncompress tar.xz linux 
Shell :: fix failed to fetch in apt-get update 
Shell :: install teamviewer ubuntu 20.04 
Shell :: angular install 
Shell :: install opera linux terminal 
Shell :: search for a commit in git logs 
Shell :: update npm with nvm 
Shell :: install material-ui 
ADD CONTENT
Topic
Content
Source link
Name
9+7 =