Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

git rename branch

git branch -m <oldname> <newname> # Any Branch
git branch -m <newname> # Current Branch

# For windows if you get "Branch already exists" error
git branch -M <newname>
Comment

git rename branch

git branch –m old-name new-name

git push origin :old-name new-name
git push origin –u new-name
Comment

git rename branch from local

1. 'Start by switching to the local branch which you want to rename:'
git checkout <old_name>

2. 'Rename the local branch by typing:'
git branch -m <new_name>
Comment

git rename branch

git push origin :old-name new-name
Comment

git rename branch

git push origin –u new-name
Comment

how to rename a branch in git

// Make sure you are in the project folder
// 1. go to your branch that you want to rename

$  git branch -m <new_branch_name>


// 2. if you are in the main branch

$  git branch <old_branch_name> <new_branch_name>



// ###  you should check by git command : $ git branch   : to check new branch name
Comment

git rename other branch

git branch -m <old name> <new name>
Comment

git rename branch

# Rename the local branch by typing:
git branch -m <new_name>
Comment

PREVIOUS NEXT
Code Example
Shell :: check difference between two branches git 
Shell :: deploy django site to aws 
Shell :: image crop and center linux 
Shell :: git untract file 
Shell :: LINUX STRING TO UPPERCASE 
Shell :: hyper terminal 
Shell :: Create and Switch To a New Branch in git command 
Shell :: bash if with function call 
Shell :: save command output to file in powershell 
Shell :: git clone with branch name command 
Shell :: ssh login without passowrd 
Shell :: shell script syntax error unexpected end of file 
Shell :: install tainwind on laravel 
Shell :: pwd in command prompt 
Shell :: kubernetes config context change environment/cluster 
Shell :: undo pushed commit 
Shell :: scp all files in currrent directory 
Shell :: mac shell echo command 
Shell :: rmdir linux 
Shell :: Move or change directory to specific location in Terminal 
Shell :: dracula theme gnome terminal 
Shell :: Remove Files and Directories 
Shell :: how to install mongodb in ubuntu 
Shell :: bash shell for windows 
Shell :: git hub nvm 
Shell :: how to use nano command in linux 
Shell :: gitlab push 
Shell :: commit to create a customised image 
Shell :: how to save a specific file in stash 
Shell :: ansible ssh on different port 
ADD CONTENT
Topic
Content
Source link
Name
8+6 =