git——创建分支后,切换分支报错(error: pathspec 'master' did not match any file(s) known to git)
error: pathspec 'master' did not match any file(s) known to git
解决办法:
1.查看分支
git branch -a
2.获取所有分支
git fetch
3.切换到远程master分支:
git checkout origin/master
4.执行git branch,可以看到我们想切换的那个分支
5.从当前的分支切换并新建分支,可以理解为即将新创建的分支是由当前分支出来的
git checkout -b 新分支名
6.建立本地分支和远程分支的追踪关系
git branch -u origin/master 新分支名
7.就可以pull了
参考资料:
https://blog.csdn.net/wankui/article/details/53328369
git——创建分支后,切换分支报错(error: pathspec 'master' did not match any file(s) known to git)的更多相关文章
- error: pathspec 'master' did not match any file(s) known to git.
问题描述: 在远程服务器上新建裸仓库git --bare init : git clone裸仓库到本地: 本地新建并切换分支xccdev,git checkout -b xccdev: 从xccde ...
- git commit 提交不了 error: pathspec 'project'' did not match any file(s) known to git.
1. 问题--使用git将代码提交到码云,使用到以下命令时: git commit -m 'init project' # 报错 error: pathspec 'project'' did not ...
- Git使用之(pathspec master did not match any file(s) known to git)
一 问题概述 今天在工作中遇到一个问题,使用很久的一个local git repository,里面只有develop分支,那么现在想将分支切换到master分支,问题来了,在切换到master分支时 ...
- git切换分支后远程提交报错
切换分支后提交,报错如下 解决办法
- 运行编译后的程序报错 error while loading shared libraries: lib*.so: cannot open shared object file: No such file or directory
运行编译后的程序报错 error while loading shared libraries: lib*.so: cannot open shared object file: No such f ...
- git切换分支报错:error: pathspec 'origin/XXX' did not match any file(s) known to git
项目上有一个分支test,使用git branch -a看不到该远程分支,直接使用命令git checkout test报错如下: error: pathspec 'origin/test' did ...
- git 本地推送远程仓库报错: error: failed to push some refs to 'https://github.com/yangtuothink/mxonline.git'
报错现象 添加远程仓库后 推送代码的时候报错 报错分析 远程代码和本地代码不匹配问题 远程初始仓库的创建有些默认 的 README什么的本地是没有的 需要先同步后再上传 报错解决 git push - ...
- MySQL创建外键约束的报错Error : Can't create table '#sql-534_185' (errno: 150)
总得来说是因为两个表的字段类型不一致,例如: 两个字段的类型或大小不严格匹配,一个为tinyint,另一个为char:或一个为int(10)另一个为int(9)也是不行的,即使都为int(10),但一 ...
- mysql启动报错ERROR! The server quit without updating PID file处理
从其它服务器拷贝编译安装后的MySQL5.7目录后启动时报错如下: ERROR! The server quit without updating PID file(/path/to/XXX.pid) ...
随机推荐
- Es学习第二课, ES安装和客户端使用
Elasticsearch安装依赖于jdk,所以大家先保证自己电脑安装好Java环境(JDK7或更高版本),并配置好环境变量:这块的配置我就不细讲了,不管是Linux还是Windows,这块的安装和配 ...
- java 调用wsdl的webservice接口 两种调用方式
关于wsdl接口对于我来说是比较头疼的 基本没搞过.一脸懵 就在网上搜 看着写的都很好到我这就不好使了,非常蓝瘦.谨以此随笔纪念我这半个月踩过的坑... 背景:短短两周除了普通开发外我就接到了两个we ...
- 【leetcode】989. Add to Array-Form of Integer
题目如下: For a non-negative integer X, the array-form of X is an array of its digits in left to right o ...
- js 中数组传递到后台controller 批量删除
/*批量删除*/function datadel(url) { var ids=[]; $("input[type='checkbox']:checked").each(funct ...
- Pydiction补全插件
Pydiction不需要安装,所有没有任何依赖包问题,Pydiction主要包含三个文件. python_pydiction.vim -- Vim plugin that autocompletes ...
- Python基础教程(008)--第一个Python程序
前言: 学会第一个Python程序 了解Python2和Python3的区别 内容 执行Python程序的三种方式 解释器--Python.Python3 交互式-- ipthon 集成开发环境--P ...
- webpack 导出、导入模块(及路径)
参考:https://blog.csdn.net/xyphf/article/details/83411552 (下面的代码亲测有效) 注:导入的模块的方法,只有两种方法 import 和 requ ...
- windows2003 disk mirror failed redundency
操作前請確認 mirror 磁盤已備份 windows2003 disk mirror failed redundency時,offline + online並不可以自動修復. 需要offline f ...
- JSON.stringify,JSON.parse方法
var obj={name:'zhangsan',age:'18'};/** js对象--->JSON字符串* JSON.stringify(js对象) --转化为--> JSON字符串* ...
- (转)SQL Server 数据类型映射
SQL Server 数据类型映射 SQL Server 和 .NET Framework 基于不同的类型系统. 例如,.NET Framework Decimal 结构的最大小数位数为 28,而 S ...