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 ...
随机推荐
- Linux进程调度算法
进程的状态 进程的基本状态 就绪:进程已获得除处理机以外的所需资源,等待分配处理机资源 执行:进程正在占用处理机资源执行 阻塞:进程等待某种条件,在条件满足之前无法执行.例如发起I/O系统调用,等待I ...
- vscode个人常用插件
1.个人常用插件记录一下,2020年7月6日
- ariba 数据补发
*&---------------------------------------------------------------------* *& Report Z_ARBA_PZ ...
- WDA学习(23):UI Element:Radio Button Group & CheckBox Group使用
1.16 UI Element:Radio Button & CheckBox使用 本实例测试Radio Button Group,CheckBox Group等的使用. 注:Dropdown ...
- 微信小程序云函数中管理短信验证码的完整SDK工具
微信小程序云开发管理短信验证码并不是一件容易的事情,它不像其他web服务器开发中可以将验证码存放到session或者cookie中,你只能将其存到云开发的数据库中,实现起来非常困难.一个简单的需要短信 ...
- 1.1 安装gin框架&使用gin编写简单服务端
01.安装gin框架 1)go环境配制 a)配制环境变量 GOPATH修改为go的工作文件夹路径 D:\Golang\goproject GOROOT修改为go的安装路径 D:\Golang\go1. ...
- Mybatis配置报错:Failed to configure a DataSource: 'url' attribute is not specified and no embe...
问题分析及解决方案 问题原因: Mybatis没有找到合适的加载类,其实是大部分spring - datasource - url没有加载成功,分析原因如下所示. DataSourceAutoConf ...
- java为什么要使用静态内部类
参考:https://blog.csdn.net/fengyuyeguirenenen/article/details/122696650 static内部类意味着: (1) 为创建一个static内 ...
- 【Delphi11】「Embarcadero.Delphi.11.0.v28.0.42600.6491.Lite.v17.0分享」
[Delphi11]转存或下载后将后缀名".exe"删除即可,或者直接右击解压缩也可.「Embarcadero.Delphi.11.0.v28.0.42600.6491.Lite. ...
- PLC入门笔记6
计数器指令及其应用 计数器指令介绍 很多场合需要进行计数操作.例如电机启动次数.生产线物料经过次数.位置传感器传送的脉冲次数等. 计数器分为普通和高速两种. 比PLC扫描频率远小于用普通,接近或大于用 ...