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 not aware of yet. Try:
git remote show origin
If the remote branch you want to checkout is under "New remote branches" and not "Tracked remote branches" then you need to fetch them first:
git remote update
git fetch
Now it should work:
git checkout -b local-name origin/remote-name
Git checkout on a remote branch does not work的更多相关文章
- 每天一命令 git checkout
检出 checkout 是git常用命令之一.主要用于创建切换分支,覆盖本地修改等 git checkout 用于显示工作区,暂存区,版本库中文件的区别 git checkout -b branch ...
- git checkout not discard changes
1. checkout one branch, show status user@vbox:/mnt/tmp$ git checkout masterSwitched to branch 'maste ...
- [Git]checkout 指定版本
Task:知道commit号,如何checkout 指定版本 1. 切换到master: git checkout master 2. 下载最新代码: git pull 3. 下载head: git ...
- git create remote branch (五)
admin@PC-panzidong MINGW64 ~/WebstormProjects/backEndServer (master) 查看本地分支信息$ git branch* master ad ...
- git之remote branch controller(远程分支控制)
1.创建本地分支 git branch //查看远程分支 git checkout -b branch_name //创建远程分支 在查看分支git branch 2.将分支提交到远程仓库 此时远程 ...
- Git branch 和 Git checkout常见用法
git branch 和 git checkout经常在一起使用,所以在此将它们合在一起 1.Git branch 一般用于分支的操作,比如创建分支,查看分支等等, 1.1 git branch 不带 ...
- git使用命令, 特别:git checkout -b a 与 git branch a区别
摘自: https://my.oschina.net/u/587974/blog/74341 创建分支: $ git branch mybranch 切换分支: $ git checkout mybr ...
- 转 git使用命令, 特别:git checkout -b a 与 git branch a区别
创建分支: $ git branch mybranch 切换分支: $ git checkout mybranch 创建并切换分支: $ git checkout -b mybranch 更新mast ...
- git入门(3)git checkout 和git branch分支的创建和删除
在一个项目中,需要多人同时开发,协同coding 要求: 开发时请用开发分支daily/0.0.1, 禁止直接使用master分支开发新建分支 git checkout -b daily/0.0.1 ...
随机推荐
- 数据结构( Pyhon 语言描述 ) — —第9章:列表
概念 列表是一个线性的集合,允许用户在任意位置插入.删除.访问和替换元素 使用列表 基于索引的操作 基本操作 数组与列表的区别 数组是一种具体的数据结构,拥有基于单个的物理内存块的一种特定的,不变的实 ...
- 安装elk,日志采集系统
#elasticsearch安装 wget https://artifacts.elastic.co/downloads/elasticsearch/elasticsearch-7.0.0-linux ...
- 【SaltStack】在Master上给Minion端安装zabbix
一.IP信息说明 [Master] IP: 192.168.236.100 [Minion] IP: 192.168.236.101 二.配置SaltStack 关于SaltStack Master和 ...
- 面试准备——springboot相关
https://www.jianshu.com/p/63ad69c480fe https://blog.csdn.net/u013605060/article/details/80255192 htt ...
- 使用systemctl命令管理服务mysql
启动mysql systemctl start mysqld.service 停止mysql systemctl stop mysqld.service 重启mysql systemctl resta ...
- mysql无法创建外键问题
在阿里云上面安装配置了Mysql后,无法创建外键, 原因及解决方法: 选择InnoDB引擎,因为MyISAM引擎不支持外键,默默地说一句,MySQL真神奇
- Windows同步阿里云时间
Ctrl+R打开cmd命令框 输入:gpedit.msc 计算机配置”—“管理模版”—“系统”—“Windows 时间服务”—“时间提供程序”—“配置 Windows NTP 客户端 双击打开配置 W ...
- 信安实验-RC4加密算法
RC4加密算法 算法具体就不介绍了,应信安老师要求整理及掌握. #include<bits/stdc++.h> using namespace std; const int N=256; ...
- php文档php-fpm.conf配置
cat php-fpm.conf|grep -v "^;"|grep -v "^$" [global] pid = run/php-fpm.pid //pi ...
- Codeforces 333E Summer Earnings ——Bitset
[题目分析] 找一个边长最大的三元环. 把边排序,然后依次加入.加入(i,j)时,把i和j取一个交集,看看是否存在,存在就找到了最大的三元环. 输出即可,n^3/64水过. [代码] #include ...