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) ...
随机推荐
- python 数组元素个数
list=[1,2,3,{1,4,5,6,7}] print(len(list)) 输出4
- JavaSE---多线程---概述
1.概述 1.1 进程: 系统进行资源分配.调度的一个独立单元: 进程的特征: 1.1.1 独立性: 系统中独立存在的实体,拥有自己独立的资源: 每个进程都拥有自己私有的地址空间,在没有经过进程本身允 ...
- 【leetcode】993. Cousins in Binary Tree
题目如下: In a binary tree, the root node is at depth 0, and children of each depth k node are at depth ...
- Mac系统下安装Homebrew后无法使用brew命令
打开终端输入 brew提示:command not found 解决方法 输入命令: sudo vim .bash_profile 然后输入以下代码: export PATH=/usr/local/b ...
- SPOJ - VLATTICE (莫比乌斯反演)
Consider a N*N*N lattice. One corner is at (0,0,0) and the opposite one is at (N,N,N). How many latt ...
- 【LeetCode 35】搜索插入位置
题目链接 [题解] 还是那句话,想知道l或者r所在的数字的含义 就想想它最后一次执行的时候在干什么就行. [代码] class Solution { public: int searchInsert( ...
- Postgresql物理存储结构
Postgresql目前不支持使用裸设备和块设备. Postgresql的属于 Relation:表示表或索引. Tuple:表示表中的行. Page:表示在磁盘中的数据块. Buffer:表示在内存 ...
- upc组队赛5 Bulbs
Bulbs 题目描述 Greg has an m × n grid of Sweet Lightbulbs of Pure Coolness he would like to turn on. Ini ...
- 06、python的基础-->编码小知识
1.编码类型ascii A : 00000010 8位 一个字节 unicode A : 00000000 00000001 00000010 00000100 32位 四个字节 中:00000000 ...
- firefox error downloading
转自:http://blog.csdn.net/feigeswjtu/article/details/42146285 做过互联网开发的都知道,firefox是我们互联网开发必备浏览器之一,浏览器是载 ...