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 ...
随机推荐
- Java IO(1)
IO这一部分内容还是比较多的,对于基础的枯燥但是又重要的内容还是将它记下来比较好. 关于File类 Ø File类直接继承与Object类,File类描述了文件本身的一些属性,File类用来获取或者处 ...
- 解决Sql Server服务远程过程调用失败
方法一:修复Sql Server: 修复过程中若遇到:重新启动计算机失败, 1.按下组合键[Win]+[R],调出运行窗口 2.输入“regedit”,在注册表左侧目录栏中找到如下位置:“HKEY_L ...
- hashCode -哈希值,Object中的方法,常根据实际情况重写
package cn.learn.collection; import cn.learn.basic.Phone; /* 哈希值:是一个十进制的整数,由系统随机给出(就是对象的地址值),是一个逻辑地址 ...
- Netty内存池及命中缓存的分配
内存池的内存规格: 在前面的源码分析过程中,关于内存规格大小我们应该还有些印象.其实在Netty 内存池中主要设置了四种规格大小的内存:tiny 是指0-512Byte 之间的规格大小,small 是 ...
- [LeetCode] 182.查找重复的电子邮箱
编写一个 SQL 查询,查找 Person 表中所有重复的电子邮箱. 示例: +----+---------+ | Id | Email | +----+---------+ | 1 | a@b.co ...
- JavaWeb学习——session总结
一.session简介 sesion也就是会话,Session对象存储特定用户会话所需的属性及配置信息.这样,当用户在应用程序的Web页之间跳转时,存储在Session对象中的变量将不会丢失,而是在整 ...
- Python入门习题10.河内塔(汉诺塔)问题
例10 共n个圆盘,a,b,c三根柱子 #汉诺塔问题.py def Hanoi(n): #定义n阶汉诺塔问题移动次数函数 if n == 1: return 1 else: return 2*Hano ...
- 【Python】Python实现Excel用例直接导入testlink-UI界面小工具
1.写在前面 testlink上传用例一种方法是excel转换为xml,然后再用xml上传,还有一种是调用api进行上传.最开始写了个转换工具,是将excel转换为xml,然后在testlink里上传 ...
- 【记录】elastiasearch 6.4.3 版本 SearchRequestBuilder字段排序,BoolQueryBuilder
参考地址: 1:https://www.cnblogs.com/shoutn/p/8027960.html 2:https://www.jianshu.com/p/8402eb930ae7 3:htt ...
- 2018-2-13-C#-Find-vs-FirstOrDefault
title author date CreateTime categories C# Find vs FirstOrDefault lindexi 2018-2-13 17:23:3 +0800 20 ...