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 :: brew portkill 
::  
::  
Shell :: ubuntu Not Found The requested URL was not found on this server. Apache/2.4.41 (Ubuntu) Server at localhost Port 80 
:: ! [remote rejected] main - main 
Shell :: remove unused images docker manually version 1.12.6 
:: linux commands 
Shell ::  
Shell :: how to prevent ubuntu from sleeping when lid is closed 
Shell :: how to check if in which folder are you present in linux 
Shell :: add to a github repo 
Shell :: git clone with folder name 
:: unzip ubuntu 
Shell :: install docker in ubuntu 
Shell :: how to zip my files without ds_store 
Shell :: bash delete folder 
Shell :: information about files linux 
Shell :: how to uninstall program on ubuntu 
Shell ::  
:: nohup example 
::  
Shell :: install samba server ubuntu 22.04 
Shell :: git checkout commit 
:: hw to login to git 
:: refresh gnome shell 
Shell :: install prettier npm 
Shell :: install express.js 
Shell :: mac os install brew 
Shell :: how to use termianl on mac to go back one directory 
Shell :: bash store contents of file in array 
ADD CONTENT
Topic
Content
Source link
Name
6+8 =