Comandi Git per sostituire un branch con un altro branch
2022-09-01•1 min di lettura
git branch -m my_feature_branch my_feature_branch_new_name # Rinomina my_feature_branch
git checkout my_feature_branch_new_name && git push origin my_feature_branch_new_name # Invia il backup all'origine, in modo che sia lì come riferimento per gli altri membri del team.
git checkout master # Effettua il checkout sul branch che sostituirà my_feature_branch
.git checkout -b my_feature_branch # Crea un nuovo my_feature_branch partendo dal branch master nel mio esempio.
git push origin my_feature_branch -f # Forzerà l'invio del nuovo branch anche all'origine