|
@@ -34,5 +34,15 @@ git branch -a
|
|
|
# 删除本地分支
|
|
|
git branch -d branch_name
|
|
|
# 删除远程分支
|
|
|
-git push remote_name --delete branch_name
|
|
|
+git push remote_name --delete remote_name branch_name
|
|
|
+
|
|
|
+# 修改本地及远程分支名称
|
|
|
+# 先修改本地分支名
|
|
|
+git branch -m oldBranch newBranch
|
|
|
+# 删除远程分支
|
|
|
+git push remote_name --delete remoteName oldBranch
|
|
|
+# 推送本地重命名后的分支
|
|
|
+git push remoteName newBranch
|
|
|
+# 将修改后的本地分支与远程分支进行关联
|
|
|
+git branch --set-upstream-to remoteName/newBranch
|
|
|
```
|