Git reset local branch & remote branch name

  • Git rename local branch
# If you're currently on the branch you wish to rename:
git branch -m new_branch_name
# If you're not on the branch you wish to rename:
git branch -m old_branch_name new_branch_name
  • Check the remote repo
git remote -v
  • Git remove the remote branch
git push remote_repo_name --delete old_branch_name
  • Git push branch
git push --set-upstream remote_repo_name new_branch_name

你可能感兴趣的:(Git reset local branch & remote branch name)