Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

change git default branch

git config --global init.defaultBranch <defaultBranchName>
Comment

change default branch github

On GitHub, navigate to the main page of the repository.
Under your repository name, click Settings.
In the left menu, click Branches.
Under "Default branch", to the right of the default branch name, click .
Use the drop-down, then click a branch name.
Click Update.
Comment

change default branch github

git branch -m master main

git push -u origin main

git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/main

# change default branch on GitHub

git push origin --delete master
Comment

how to change my default branch in git

'settings' >> 'Code and Automation' >> 'Branches' >> 'Default Branch'

On GitHub.com, navigate to the main page of the repository.
Under your repository name, click "Settings".
In the "Code and automation" section of the sidebar, click "Branches".
Under "Default branch", to the right of the default branch name, click.
Use the drop-down, then select a branch name.

source: 'https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-branches-in-your-repository/changing-the-default-branch#changing-the-default-branch'
Comment

Change default branch on git

git branch -m deploy prod
git fetch origin
git branch -u origin/prod prod
git remote set-head origin -a
Comment

PREVIOUS NEXT
Code Example
Shell :: remove file via command line 
Shell :: @types/react-native-vector-icons 
Shell :: git squash commit 
Shell :: create git repository 
Shell :: linux set environment 
Shell :: sudo run command as another user 
Shell :: drf social auth 
Shell :: git diff between one file 
Shell :: ruby install on fedora 
Shell :: linux bash do something when file changes 
Shell :: how to create new branch in git 
Shell :: sed print from match to end of file 
Shell :: kibana download 
Shell :: error: resource android:attr/lStar not found. 
Shell :: how to cat only the first ten lines of a file linux 
Shell :: add alias fish shell 
Shell :: delete all mail terminal 
Shell :: django oauth toolkit 
Shell :: awk delimiter comma 
Shell :: linux unique lines 
Shell :: how to get first in jq 
Shell :: linux makefile 
Shell :: powershell script example 
Shell :: sonarqube linux installation 
Shell :: how to encrypt and decrypt a text file using openssl rsa public and private keys 
Shell :: bash list 
Shell :: sed add newline 
Shell :: get previous git stash 
Shell :: git clone password authentication failed 
Shell :: deploy github repo to heroku 
ADD CONTENT
Topic
Content
Source link
Name
1+2 =