Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

how to move master branch to main branch

# 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

git move change from master to new branch

git stash						//you can stash the changes in the master branch .
git checkout -b newbranchname	//then checkout the branch
git stash pop					//and pop the changes here
Comment

PREVIOUS NEXT
Code Example
Shell :: find cuda path 
Shell :: install ext-pdo_sqlite 
Shell :: linux find directores 
Shell :: angular cli linux 
Shell :: how to see the origin in git 
Shell :: install polybar ubuntu 20.04 
Shell :: port 5000 already in use 
Shell :: install drush ubuntu 
Shell :: angular 
Shell :: docker compsoe ubuntu 
Shell :: albert for ubuntu 
Shell :: office 2016 activation crack 
Shell :: shebang 
Shell :: install scoop 
Shell :: apt install antiword 
Shell :: psycopg2 error install 
Shell :: tar.gz 
Shell :: how to convert ui to py pyside2 
Shell :: install sequelize cli 
Shell :: install vue js ubuntu 
Shell :: E: Unable to locate package libboost-signals-dev 
Shell :: install getkirby 
Shell :: lollypop music player install ubuntu 
Shell :: powershell convert string to int 
Shell :: how to uninstall grepper 
Shell :: install mongodb on m1 
Shell :: ffmpeg shrink video size 
Shell :: shell: search a string if it contains another string 
Shell :: docker iniciar contenedor automáticamente 
Shell :: git remote set-url username password 
ADD CONTENT
Topic
Content
Source link
Name
3+6 =