Questions tagged [sparse-checkout]

A working copy of version controlled code which doesn't include the whole repository.

124 questions
4
votes
0 answers

Can sparse-checkout patterns be added to .gitmodules?

Let's say I have a git submodule and I want to to enable sparse-checkout on it. Is it possible to do so and add that file to the repository for other people that clone? The git submodule gets added to /.gitmodules but the sparse checkout file for…
Evan Carroll
  • 78,363
  • 46
  • 261
  • 468
4
votes
2 answers

How to do a sparse checkout and update from SVN on Jenkins?

We have a large SVN repository and I would like to do a sparse checkout on Jenkins. I do understand the concept of sparse checkouts and having it locally I can get things to work as I would like to have it. Doing things on Jenkins however and…
nogenius
  • 574
  • 1
  • 6
  • 18
4
votes
1 answer

Creating a sparse and shallow clone of a git repository results in error: trying to write non-commit object

I want to create a sparse and shallow clone of a git repository at a certain tag. This is what I am currently doing: git init avatica-tmp cd avatica-tmp git remote add origin https://github.com/apache/calcite-avatica/ git config…
F21
  • 32,163
  • 26
  • 99
  • 170
4
votes
3 answers

Git commit/Push/Pull with sparse checkout

I started Git yesterday and before that I was using SVN since many years. Let me explain you what exactly I am trying to achieve: I have a main git repo for different projects. Something like this: main_repo/proj1 main_repo/proj2 main_repo/proj3 I…
user2793078
  • 419
  • 7
  • 12
4
votes
1 answer

Does sparse checkout affect git fetch?

I looked at How do I clone a subdirectory only of a Git repository?, and the top voted answer says to use sparse checkout. But this comment says that it still downloads the entire repo. Which is correct? Does sparse checkout affect fetch, or does it…
Paul Draper
  • 78,542
  • 46
  • 206
  • 285
4
votes
3 answers

error: Sparse checkout leaves no entry on working directory

First, let me tell you that I have already checked all the similar threads and searched google to find what the problem may be, but no success. My problem is that I'm trying to use sparse checkout in git, but I get this error: error: Sparse checkout…
lawicko
  • 7,246
  • 3
  • 37
  • 49
4
votes
1 answer

sparse svn update of deep directory structure

Is there a way to have a sparse checkout of an SVN repo with deep nested directory structure. I'm doing this using a listing of all the files in the repo and filtering for just *.xml: svn list --recursive "http://myRepo.com/trunk" > allFiles.txt I'm…
Dougnukem
  • 14,709
  • 24
  • 89
  • 130
3
votes
1 answer

How to Sparse checkout with Tortoise Git?

The working way to sparse checkout using git bash is: git clone \ --depth 1 \ --filter=blob:none \ --sparse \ https://github.com/darc-coder/FindMyQRApp \ cd test-git-partial-clone git sparse-checkout set js How do we sparse checkout this same…
DarkCoder
  • 93
  • 1
  • 11
3
votes
1 answer

Git clone is not working due to bad file path

Problem Git cloning the repository on a Windows 10 machine throws this error: error: invalid path 'saleor/graphql/core/tests/cassettes/test_get_oembed_data[http:/www.youtube.com/watch?v=dQw4w9WgXcQ-VIDEO].yaml' fatal: unable to checkout working…
Megidd
  • 7,089
  • 6
  • 65
  • 142
3
votes
1 answer

git sparse-checkout ignore specific file type

I have a git repository with a bunch of large csv in them, which I don't want to clone, so I came across git sparse-checkout and this post: https://github.blog/2020-01-17-bring-your-monorepo-down-to-size-with-sparse-checkout/ From this post I took…
Frode Akselsen
  • 616
  • 2
  • 8
  • 23
3
votes
0 answers

Efficiently updating a git submodule from a sparse checkout of the main repository

I am writing some automation to update a git submodule to the latest on the remote. Normally this is achieved by specifying branch= in the .gitmodules and running: git submodule update --remote But for me this is not suitable. The main…
Forrest Coward
  • 113
  • 1
  • 6
3
votes
0 answers

Clone a git repository without checking out the whole repo - sparse checkout procedure?

I need access to a small number of directories in a git repository that is 250 GB. Obviously checking out the whole thing is a big hit in time and disk space. I cannot, however, find a working solution to how to get only the desired directories. …
KirkD-CO
  • 1,603
  • 1
  • 22
  • 35
3
votes
1 answer

Git sparse checkout to only honor a folder at the root of the repo?

We have a repo with a bunch of projects. I am only concern with the "oracle" project within the repo. However, upon pulling down the codebase, I found subdirectories called "oracle" within other folders. Is there a way to only grab the parent folder…
sdot257
  • 10,046
  • 26
  • 88
  • 122
3
votes
1 answer

git clone with different file permissions

On our server are three (in reality: thousands of) text files stored in a bare git repository: A.txt, B.txt, C.txt. User "admin" should view/edit them all. User "Foo" should view/edit "A.txt" and "B.txt" but he is not allowed to see the content of…
Bernhard
  • 53
  • 1
  • 2
3
votes
2 answers

Selective Checkout or a View, on a project in repository

I have a bunch of interconnected projects which share the same project tree. I'm looking for a version control system which provides a possibility to checkout a subset of the project tree. If my the full project tree looks like this: Project Root …
Yossi
  • 11,778
  • 2
  • 53
  • 66
1 2
3
8 9