Rename Git Branch Name Locally and Remotely.
Step-1 Go to your branch
push new branch and reset the upsteram
Step-1 Go to your branch
git branch <old_branch_name>
Step-2 Git command to rename the local branch namegit branch -m <new_branch_name>
Step-3 check branch name changedgit branch
Step-4 if you have already push the old branch to remote repository then push your new branch and delete old branch.push new branch and reset the upsteram
git push origin -u <new_branch_name>
Delete old branch from remote repositorygit push origin --delete <old_branch_name>
No comments:
Post a Comment