Rename a Local and Remote Git Branch
Renaming Git Branch
Follow the steps below to rename a Local and Remote Git Branch:
01 Start by switching to the local branch which you want to rename:
git checkout <old_name>
02 Rename the local branch by typing:
git branch -m <new_name>
03. Push the <new_name> local branch and reset the upstream branch:
git push origin -u <new_name>
04. Delete the <old_name> remote branch:
git push origin --delete <old_name>
来源: https://linuxize.com/post/how-to-rename-local-and-remote-git-branch/
Rename a Local and Remote Git Branch的更多相关文章
- Rename a local and remote branch in git
If you have named a branch incorrectly AND pushed this to the remote repository follow these steps b ...
- git branch & git remote branch
git branch & git remote branch $ git branch -h usage: git branch [<options>] [-r | -a] [-- ...
- 【IDEA】 Can't Update No tracked branch configured for branch master or the branch doesn't exist. To make your branch track a remote branch call, for example, git branch --set-upstream-to origin/master
IDEA点击GIT更新按钮时,报错如下: Can't UpdateNo tracked branch configured for branch master or the branch doesn' ...
- git远程删除分支后,本地git branch -a 依然能看到的解决办法
http://blog.csdn.net/qq_16885135/article/details/52777871 使用 git branch -a 命令可以查http://blog.csdn.net ...
- git branch 分支管理
在多人协作的情况下,master通常是稳定的分支.可以再建一些"develop","testing"等名称的分支.主管master的人做开发的话最好也建立自己的 ...
- Git: Setup a remote Git repository
o setup a folder on a server which service for remote Git repository, apply the following steps: Cre ...
- git 使用详解(9)-- 分支的新建与合并 git branch -d、merge、 --merged/--no-merged/-v
现在让我们来看一个简单的分支与合并的例子,实际工作中大体也会用到这样的工作流程: 开发某个网站. 为实现某个新的需求,创建一个分支. 在这个分支上开展工作. 假设此时,你突然接到一个电话说有个很严重的 ...
- git远程删除分支后,本地执行git branch -a依然能看到删除分支到底该咋整?
使用命令git branch -a可以查看所有本地分支和远程分支(git branch -r 可以只查看远程分支) 如果发现很多在远程仓库已经删除的分支在本地依然可以看到到底该怎么办呢?(反正强迫症受 ...
- [git]git的基本原理|git branch|git
继续写一篇git的文章,介绍下git的历史和基本原理. 介绍下git的历史,据砖家考究,遥想当年,linux的创始人,牛人李纳斯,开发linux用的版本控制工具BitKeeper,出于公益或友好, 是 ...
- git branch --set-upstream-to=
test@uat:/usr/server/app_server# git config --local -lcore.repositoryformatversion=0core.filemode=tr ...
随机推荐
- python 的sys.argv 和 sys.path.append() 用法和PYTHONPATH环境变量
sys.argv 我们编写一个测试用例test.py ,内容如下 imoprt sys a = sys.argv b = len(sys.argv) c = sys.argv[0] d = sys.a ...
- 拉取docker容器后启动容器的脚本
我暂且不论如何拉取docker镜像.我使用sudo docker images查看拉取的镜像. 譬如我拉取nvidia的pytorch镜像后,想要创建一个实例或启动某实例,可使用如下脚本(如果本地没有 ...
- mycat分片的十四种算法
MyCat的分片规则配置在 conf目录下的 rule.xml文件中定义 ; 环境准备 : schema.xml中的内容做好备份 , 并配置 逻辑库; <schema name="PA ...
- unity读取Excel表格保存到Sqlite数据库
1.读取Excel表格和保存sqlite数据库所用到的dll文件 下载链接:dll文件 最后如下图所示 废话不多说了,直接上代码吧 因为太长就折叠了 using System.Collection ...
- Typora中的emoji表情
People :smile: :laughing: :tired_face: :blush: :smiley: ️ :relaxed: :smirk: :heart_eyes: :ki ...
- Flink配置详解及实践
#jobManager的IP地址jobmanager.rpc.address: localhost #JobManager的端口号jobmanager.rpc.port: 6123 # JobMana ...
- 物联网5G工业网关的特点和应用场景
BMG5100 系列产品,是一款工业级 5G 千兆物联网网关.集数据管理.智能采集.多种协议 转换.5G/4G 无线通信.数据处理转发.VPN 虚拟专网.本地存储.WIFI 覆盖等功能于一体. 产品特 ...
- Html5本地存储概念,有什么优点,与cookie有什么区别?
html5中的Web Storage包括了两种存储方式:sessionStorage和localStorage sessionStorage用于本地存储一个会话(session)中的数据,这些数据只有 ...
- Cxf框架中@WebService注解的使用
最近工作中总是不可避免的使用WebService来对接功能,经过自己一番摸索,总结出了一些使用方法,做一下记录: 记录了两个SpringBoot版本使用WebService的一些问题和用法,Sprin ...
- Pnetlab中锐捷镜像反复重启或telnet无法键入内容
PNETLab 版本: 5.2.7 或 5.3.3等 锐捷镜像版本: V1.03 故障详情: 基于前文的系统环境和锐捷镜像.替换后的yml文件,更新PnetLAB版本到5.3.3后,设备循环重启,无法 ...