git branch -a #查看所有分支
git branch -r #查看远程分支
git branch -vv #查看本地分支所关联的远程分支
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch 或者git push -u origin new_branch# Push the new branch, set local branch to track the new remote
注意:把origin改为自己的名称
本文介绍如何使用Git进行分支管理,包括查看本地和远程分支、重命名分支、删除旧分支及推送新分支等实用命令。
765

被折叠的 条评论
为什么被折叠?



