Rename your local foo branch with bar:

git branch -m foo bar

Remember this will add the new branch when you push, but it won’t delete the old foo remote branch.

Add -f --mirror to rename the branch on the remote:

git push origin -f --mirror

If you just want to remove your remote foo branch, just use:

git push origin :foo

[Git] How to rename your remote branch的更多相关文章

  1. 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 ...

  2. git branch & git remote branch

    git branch & git remote branch $ git branch -h usage: git branch [<options>] [-r | -a] [-- ...

  3. 【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' ...

  4. Git checkout on a remote branch does not work

    I believe this occurs when you are trying to checkout a remote branch that your local git repo is no ...

  5. git create remote branch (五)

    admin@PC-panzidong MINGW64 ~/WebstormProjects/backEndServer (master) 查看本地分支信息$ git branch* master ad ...

  6. git pull的时候提示git pull <remote> <branch>

    yuanqiao@yuanqiao-PC MINGW64 /h/WorkSpace/git/dadeTest (dev)$ git pullremote: Enumerating objects: 7 ...

  7. Git 协作:Fetch Pull Push Branch Remote Rebase Cherry-pick相关

    前言 学习git的时候,我们首先学习的是最常用的,自己独立开发Software时用的命令: git init //初始化git仓库 git add <file_name> //将文件添加到 ...

  8. eclipse git 一个错误:the current branch is not configured for pull No value for key branch.xxx.merge found

    eclipse git 一个错误:the current branch is not configured for pull No value for key branch.xxx.merge fou ...

  9. git报错:'fatal:remote origin already exists

    git报错:'fatal:remote origin already exists'怎么处理?附上git常用操作以及说明.   git添加远程库的时候有可能出现如下的错误, 怎么解决? 只要两步: 1 ...

随机推荐

  1. 使用缓存Memcache存储更新微信access token

    关键字:Memcache access_token 更新 存储 7200 本文介绍如何使用缓存Memcache存储及更新 access token的方法. 一.Access Token access_ ...

  2. DG Cascade Standby

    SUMMARY 1. logical standby不支持cascading standby 2. 11.2.0.2之前版本cascading standby不支持RAC 3. 11.2.0.3之前版 ...

  3. php学习笔记6

    PHP 字符串变量 PHP 中的字符串变量 字符串变量用于包含有字符的值. 在创建字符串之后,我们就可以对它进行操作了.您可以直接在函数中使用字符串,或者把它存储在变量中. 在下面的实例中,我们创建一 ...

  4. springMVC通过ajax传递参数list对象或传递数组对象到后台

    springMVC通过ajax传递参数list对象或传递数组对象到后台 环境: 前台传递参数到后台 前台使用ajax 后台使用springMVC 传递的参数是N多个对象 JSON对象和JSON字符串 ...

  5. 洛谷——P1012 拼数

    https://www.luogu.org/problem/show?pid=1012#sub 题目描述 设有n个正整数(n≤20),将它们联接成一排,组成一个最大的多位整数. 例如:n=3时,3个整 ...

  6. 初识ThreadLocal

    近期公司在进行Java开发者的招聘活动,当中有一道面试题是这种:"请简单描写叙述一下ThreadLocal类的作用." 结果发现有非常多的面试者没有听说过ThreadLocal或者 ...

  7. shell脚本中的反引号,单引号,双引号与反斜杠

    转自:http://blog.sina.com.cn/s/blog_6561ca8c0102we2i.html 反引号位 (`)经常被忽略,而且容易与单引号弄混.它位于键盘的Tab键的上方.1键的左方 ...

  8. 前端面试题(HTML/CSS)

    (前端面试题大全,持续更新) 常用的块级元素和行内元素有哪些?说说他们的特点? 浮动产生的原因?清除浮动? 说说一下盒模型 float和position一起用是什么效果 rem用过吗?做不同手机的适配 ...

  9. 【习题 6-10 UVA - 246】10-20-30

    [链接] 我是链接,点我呀:) [题意] 在这里输入题意 [题解] 发牌的那个牌堆用一个deque,7个牌堆用vector来模拟. 然后按照题意模拟就好. 不难. [代码] /* 1.Shoud it ...

  10. Ubuntu 12.04 64bit GCC交叉编译器制作 原创

                                                                                                        ...