shallow update not allowed
! [remote rejected] master -> master (shallow update not allowed)
https://stackoverflow.com/questions/28983842/remote-rejected-shallow-update-not-allowed-after-changing-git-remote-url
As it seems you have used git clone --depth <number>
to clone your local version. This results in a shallow clone. One limitation of such a clone is that you can't push from it into a new repository.
You now have two options:
- if you don't care about you're current or missing history, take a look at this question
- if you want to keep your full history, then continue reading:
So, you want to keep your history, eh? This means that you have to unshallow your repository. To do so you will need to add your old remote again.
git remote add old <path-to-old-remote>
After that we use git fetch
to fetch the remaining history from the old remote (as suggested in this answer).
git fetch --unshallow old
And now you should be able to push into your new remote repository.
Note: After unshallowing your clone you can obviously remove the old remote again.
个人分析:
比如从网址1(github) clone一个repository,但是repository很大。过了一段时间,可能git后台回收了一部分objects,太久不用的。
那么等你想要更换网址2(osc)的时候,比如push到osc的时候。
这个时候push,可能就会少一些文件。
那么需要git fetch --unshallow github
然后再git push osc
shallow update not allowed的更多相关文章
- Git - grafted 和 shallow update not allowed
一般人对开源的模板进行修改是总会进行这样的一条龙操作 # 克隆最近一次提交 git clone xxx --depth 1 # 修改修改修改 提交提交提交 vim xxx git commit -am ...
- 运行 composer update,提示 Allowed memory size of bytes exhausted
composer update运行之后,提示 PHP Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to ...
- Vue-数据绑定原理
VueJS 使用 ES5 提供的 Object.defineProperty() 方法实现数据绑定. 感觉实现时主要是在 defineProperty 的 set 和 get 上做了很多文章,在 ge ...
- Nutch源码阅读进程3---fetch
走了一遍Inject和Generate,基本了解了nutch在执行爬取前的一些前期预热工作,包括url的过滤.规则化.分值计算以及其与mapreduce的联系紧密性等,自我感觉nutch的整个流程是很 ...
- nutch-default.xml文件
Nutch中的所有配置文件都放置在总目录下的conf子文件夹中,最基本的配置文件是conf/nutch-default.xml.这个文件中定义了 Nutch的所有必要设置以及一些默认值,它是不可以被修 ...
- Nutch源码阅读进程3
走了一遍Inject和Generate,基本了解了nutch在执行爬取前的一些前期预热工作,包括url的过滤.规则化.分值计算以及其与mapreduce的联系紧密性等,自我感觉nutch的整个流程是很 ...
- Nutch的nutch-default.xml和regex-urlfilter.txt的中文解释
nutch-default解释.xml <?xml version="1.0"?> <?xml-stylesheet type="text/xsl&qu ...
- Oracle Form's Trigger Tutorial With Sample FMB
Created an Oracle Form to handle specific events / triggers like When-New-Form-Instance, Pre-Insert, ...
- Nutch学习笔记二——抓取过程简析
在上篇学习笔记中http://www.cnblogs.com/huligong1234/p/3464371.html 主要记录Nutch安装及简单运行的过程. 笔记中 通过配置抓取地址http://b ...
随机推荐
- cts测试流程
测试目的: 用于检测你做的Android系统是否满足兼容性要求,通俗点说,Google认为Android系统应该满足的条件,你需要满足. 例如框架层暴露给应用层的某些接口,Google认为你因该有,那 ...
- Locally weighted regression algorithm
在此引出另一种模型:Locally weighted regression algorithm(LWLR/LWR),通过名字我们可以推断,这是一种更加关注局部变化的模型.的确如此,在普通的linear ...
- Chrome开启多线程下载
Chrome多线程下载也和标签页预览一样属于Google测试中的功能,可通过在地址栏输入chrome://flags/,然后在搜索框中输入Parallel downloading,选择enabled, ...
- Zepto v1.0-1源码注解
/* Zepto v1.0-1-ga3cab6c - polyfill zepto detect event ajax form fx - zeptojs.com/license */ ;(funct ...
- 这样设计 Java 异常更优雅,赶紧学!
来源:lrwinx.github.io/2016/04/28/如何优雅的设计java异常/ 导语 异常处理是程序开发中必不可少操作之一,但如何正确优雅的对异常进行处理确是一门学问,笔者根据自己的开发经 ...
- Leetcode Lect2 Java 中的 Interface
什么是 Interface Java接口(Interface)是一系列方法的声明,是一些方法特征的集合,一个接口只有方法的特征没有方法的实现,因此这些方法可以在不同的地方被不同的类实现,而这些实现可以 ...
- bounds与frame的区别及setBounds的使用
转自http://www.cocoachina.com/ios/20140925/9755.html 在iOS开发中经常遇到两个词Frame和bounds,本文主要阐述Frame和bound的区别,尤 ...
- Java-java.lang.NoClassDefFoundError:brave.Span.Kind
今天在升级某个框架时,遇到如标题描述的问题.这个问题应该说还是比较明显的,首先去搜了一下NoClassDefFoundError的问题,参考这篇博客:https://www.cnblogs.com/x ...
- Java并发(具体实例)—— 构建高效且可伸缩的结果缓存
这个例子来自<Java并发编程实战>第五章.本文将开发一个高效且可伸缩的缓存,文章首先从最简单的HashMap开始构建,然后分析它的并发缺陷,并一步一步修复. hashMap版本 ...
- Sass Maps的函数-map-keys($map)
map-keys($map) 函数将会返回 $map 中的所有 key.这些值赋予给一个变量,那他就是一个列表.如: map-keys($social-colors); 其返回的值为: "d ...