blog: Git修改分支名
This commit is contained in:
parent
6c36c2d8be
commit
35a032e268
|
|
@ -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. 删除远程分支
|
2. 删除远程分支
|
||||||
```sh
|
```sh
|
||||||
git push origin :oldBranchName
|
git push origin :oldBranchName
|
||||||
|
# 或者 git push origin --delete oldBranchName
|
||||||
```
|
```
|
||||||
|
|
||||||
3. 改名后的本地分支推送到远程
|
3. 改名后的本地分支推送到远程
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue