Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

git change branch name

git branch –m old-name new-name
Comment

Change a branch name in a Git repo

If you're currently on the branch you want to rename:

git branch -m new_name 
Or else:

git branch -m old_name new_name 
You can check with:

git branch -a
As you can see, only the local name changed Now, to change the name also in the remote you must do:

git push origin :old_name
This removes the branch, then upload it with the new name:

git push origin new_name
Comment

how to change branch name in github

$ git branch -m OLD-BRANCH-NAME NEW-BRANCH-NAME
$ git fetch origin
$ git branch -u origin/NEW-BRANCH-NAME NEW-BRANCH-NAME
Comment

change branch name

 $ git branch -m <new_name>
Comment

change branch name

git branch -m <newname>
Comment

change branch name

git branch -m new-branch-name
Comment

change name of branch github

git push origin :old-name-of-branch-on-github
git branch -m old-name-of-branch-on-github new-name-for-branch-you-want
git push origin new-name-for-branch-you-want
Comment

how to change branch name

Rename a local and remote branch in git
Rename your local branch. If you are on the branch you want to rename: git branch -m new-name. ...
Delete the old-name remote branch and push the new-name local branch. git push origin :old-name new-name.
Reset the upstream branch for the new-name local branch. Switch to the branch and then: git push origin -u new-name.
Comment

PREVIOUS NEXT
Code Example
Shell :: openssl list certificate chain 
Shell :: bashrc sleep command 
Shell :: open directory windows command 
Shell :: open current folder in terminal linux 
Shell :: what is my ip 
Shell :: git merge branch to another branch 
Shell :: bash for interval 
Shell :: command line windows find file 
Shell :: update ruby version ubuntu 
Shell :: linux c programm time 
Shell :: best source code editor 
Shell :: git ignore after commit 
Shell :: kill app processes on port 3306 
Shell :: writing to a text file in batch script 
Shell :: execute c# ubuntu 
Shell :: wsl2 ubuntu xfce 
Shell :: rename branch in git 
Shell :: umask linux 
Shell :: step10 pgadmin ubuntu 20.04 
Shell :: react navigation stack 
Shell :: saving fonts on linux for figma 
Shell :: Pull Ubuntu image 
Shell :: docker set container name 
Shell :: online c compiler with working fork 
Shell :: git warning redirecting to 
Shell :: install rtools rstudio 
Shell :: make flameshot default 
Shell :: linux print directory tree 
Shell :: Install JDK on Rocky Linux 8 
Shell :: how to uninstall global babel jest npm 
ADD CONTENT
Topic
Content
Source link
Name
7+2 =