Questions tagged [shallow-clone]
82 questions
4
votes
1 answer
String.MemberwiseClone() method called through reflection doesn't work, why?
Let me start by saying that I know it is a protected method and I'm not supposed to call it, but shouldn't it work since MemberwiseClone is defined in the Object class and String inherits from it?
So this is the cloning method (I removed null…

Thomas C. G. de Vilhena
- 13,819
- 3
- 50
- 44
3
votes
3 answers
Create shallow copy/clone of subclass of EntityObject
We have an audit table in our database, and on update the old and new values are serialized to XML and stored in the same row. The objects are currently deep-cloned thus:
public EntityObject CloneEntity(EntityObject obj)
{
…

sennett
- 8,014
- 9
- 46
- 69
3
votes
0 answers
Git describe on a shallow clone is nondeterministic
I have a git repo where feature branches are merged into a master branch, and there are version tags on some of these merge commits. Jenkins builds the master branch from a shallow clone, but needs to use the version numbers in the tags, so there's…

Dániel Szoboszlay
- 548
- 4
- 7
3
votes
1 answer
Clone the latest version of a git repository through https
I would like to get some files from a project :
I do not need to clone the entire repository : I need only the latest snapshot from the master branch. This is important for me because, my bandwidth is quite low, it takes some time to download…

Eric
- 5,101
- 10
- 37
- 45
2
votes
1 answer
What is the status of the Mercurial Shallow Clone extension?
Talk of Shallow Clone Extension
There had been some talk about work on an unofficial Shallow Clone extension for Mercurial. This extension would function similarly to the git clone --depth X extension, but would provide better push support and…

Michael La Voie
- 27,772
- 14
- 72
- 92
2
votes
1 answer
How to install brew using a shallow clone (especially useful in CI systems)
The brew installer does a git clone of some very large repositories, which is slow.
It doesn't use:
shallow clones because GitHub asked them not to so-as to avoid brew update being slower c.f. https://github.com/Homebrew/install/issues/541,…

John Vandenberg
- 474
- 6
- 16
2
votes
0 answers
Same git size with and without --depth=1
I am writing a script that clones a large git repository, modifies a few files and pushes the changes back to the remote. It needs to run as fast as possible.
Right now, it takes about 10 minutes to clone the repository. The resulting folder is…

Touloudou
- 2,079
- 1
- 17
- 28
2
votes
1 answer
Git clone or submodule update does not find private key file if depth flag is set
I'm cloning a repository with a few submodules. In order to save time I'm doing a shallow clone passing the private key as environment variable. Example:
GIT_SSH_COMMAND="ssh -i temp_pvt_key.key" git clone -b my_branch --depth=1…

Idemax
- 2,712
- 6
- 33
- 66
2
votes
1 answer
Jenkins not able to pull 20 GB git repo
My Jenkins build is failed as it's not able to pull 20 GB git repo. Please let me know where I am wrong or missing something.
For details please see screenshots below:
Note: I tried increasing time out but it didn't work

Ashish Karpe
- 5,087
- 7
- 41
- 66
2
votes
0 answers
Git pull shallow clone after detached HEAD
Let us consider two following cases.
Case #1 (shallow clone).
$ git clone --depth 5 ssh://{REMOTE_URL}/project.git
...
$ git checkout fd459887439f2cf93725c2f4a1a39997e865a86d // it is just a latest commit (took it from "git rev-parse HEAD")
...
$…

Alexander Samoylov
- 2,358
- 2
- 25
- 28
2
votes
0 answers
What information is kept in the `.git/shallow` file?
I know git considers a repository shallow if it has a .git/shallow file in the .git directory.
When cat-ing the file on a locally cloned shallow repository of depth 5 I see only one hash while when I run a jenkins job to clone the same repo at depth…

Wimateeka
- 2,474
- 2
- 16
- 32
2
votes
3 answers
Is it possible to shallow copy a singleton class object?
Using the clone method, can we get many instances of a class which has been made singleton ?
Also, is it necessary to write "implements Cloneable" because I learnt that all objects extend from Object class and hence the child object calling…

Prabhat Gaur
- 146
- 1
- 10
2
votes
1 answer
How to perform shallow clone using Composer?
I've got the following composer.json:
{
"require": {
"php": ">=5.2.0",
"queueit/KnownUser.V3.PHP": "dev-master"
},
"config": {
"autoloader-suffix": "ComposerManager",
"vendor-dir":…

kenorb
- 155,785
- 88
- 678
- 743
2
votes
2 answers
How to make a Git repository or submodule shallower
I'm cloning many third-party projects' git repo under a "Third-party Software" subdirectory in my workspace, however I don't want to keep any history from them(the latest snapshot will do); also I'm sharing many same submodules in many project in…

Buo-ren Lin
- 142
- 8
2
votes
1 answer
Sparse checkout and shallow clone
When I tried to add library to CDN it's says I need to sparse checkout and shallow clone to make PR easily. So what's those? I read some articles but didn't understand well.

Asim K T
- 16,864
- 10
- 77
- 99