version control - Comment puis-je renommer une branche Git locale

Mots clés : gitversion-controlgit-branchgit

meilleur 5 Réponses version control - Comment puis-je renommer une branche Git locale

vote vote

92

git branch -m <oldname> <newname> 
git branch -m <newname> 
git push origin -u <newname> 
git push origin --delete <oldname> 
git config --global alias.rename 'branch -m' 
git branch -M <newname> 
vote vote

80

git branch -m old_branch_name new_branch_name 
vote vote

77

git branch -m <newname> 
vote vote

67

git branch --unset-upstream 
vote vote

51

git branch -m new-name 
git branch -m old-name new-name 
git push origin :old-name new-name 
git push origin -u new-name 

Questions similaires