Tuesday, July 4, 2017

Rename git branch

Create a new branch from the old one:

git checkout branch_name
git checkout -b new_branch_name
git push --set-upstream origin new_branch_name

Delete the old branch local and remote:

git branch -D branch_name
git push origin --delete branch_name

Possible you want to rebase or squash commits:

git rebase -i master

=happy=

No comments: