blog: Git修改分支名

This commit is contained in:
xugaoyi 2022-08-11 10:53:30 +08:00
parent 6c36c2d8be
commit 35a032e268
1 changed files with 14 additions and 0 deletions

View File

@ -1,3 +1,16 @@
---
title: Git修改分支名
date: 2022-08-11 10:51:18
permalink: /pages/922650/
categories:
- 技术
- 技术文档
tags:
-
author:
name: xugaoyi
link: https://github.com/xugaoyi
---
## 同时修改本地分支名和对应的远程分支名
@ -11,6 +24,7 @@ git branch -m oldBranchName newBranchName
2. 删除远程分支
```sh
git push origin :oldBranchName
# 或者 git push origin --delete oldBranchName
```
3. 改名后的本地分支推送到远程