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 ...
随机推荐
- 慢SQL
慢SQL 目录 慢SQL 一.慢SQL概念 2.参数 3.配置 3.1.slow_query_log 3.2.slow_query_log_file 3.3.long_query_time 3.4.l ...
- .Net Core自定义中间件(Middleware)
.Net Core支持开发者自定义中间件 UseMiddleware<自定义class>(); app.UseMiddleware<AuthFuncMiddleware>(); ...
- DELL品牌电脑开机显示supportASsiSt丨pre-Boot SyStem Proforman?
这个问题,我百度了N个网站,得到的结果都是针对老版本BIOS的 https://wen.baidu.com/question/1647310335599401700.html https://zhua ...
- pushd 和 popd
可以把你当前的文件路径 放进一个栈里,后边拿出来 很方面的skim方法
- CF513F2 题解
题意 传送门 有 \(a+b+1\) 个会动的棋子,在一个大小为 \(n\times m\) 的棋盘上,棋盘上有一些点有障碍.棋子中,有 \(a\) 个红色棋子,\(b\) 个蓝色棋子,和 \(1\) ...
- js时间转化为几天前,几小时前,几分钟前
在前面一篇文章中,我们学习到了如何获取时间和怎么算出两者之间的时间差 今天看看怎么将时间戳转换为几个月前,几周前,几天前,几分钟前的形式.与上面类似通过JavaScript计算当前时间与定义的时间的对 ...
- DB2日常维护操作
一. DB2日常维护操作 1.数据库的启动.停止.激活 db2 list active databases db2 active db 数据库名 db2start --启动 db2stop [forc ...
- 学习lua-02,引入其他lua文件,调用全局方法
local testlua = require "testlua" --testlua.compertoNum(1, 2, 4, 5, 11, 23, 543, 123, 45, ...
- C# 屏蔽词过滤
参考:https://www.cnblogs.com/kubidemanong/p/10834993.html public class TreeNode { public char Char; pu ...
- Mysql--查询"01"课程比"02"课程成绩高的学生的信息及课程分数
今天在写Mysql代码作业时,写到这个题,感觉值得分享!!!!!!! 查询"01"课程比"02"课程成绩高的学生的信息及课程分数 分析如下: 首先先查询&quo ...