A working copy of version controlled code which doesn't include the whole repository.
Questions tagged [sparse-checkout]
124 questions
3
votes
1 answer
Subversion: Query Sparse Checkout Status
There are a number of posts (e.g. here, and here, not to mention the official documentation) which ask/explain how to perform a sparse checkout, but I don't see any post on how to query the depth of a folder or a series of folders.
Is there anyway…

Benjamin Leinweber
- 2,774
- 1
- 24
- 41
3
votes
2 answers
Why does git sparse checkout leave behind directories?
Some background: My company's service model began as an appliance-based server model. We would send our client a server with Windows Server 2003/2008 on it, pre-loaded with a webserver and our software. We're moving all of the client-specific…

V13Axel
- 838
- 5
- 10
3
votes
2 answers
git checkout . adds directories excluded by sparse checkout
In a sparse checkout scenario, the command git checkout . restores the directories that should be ignored. Is this by design, or a potential problem in Git? I’m using git checkout . to discard any changes I’ve made to my working copy -- is there…

krlmlr
- 25,056
- 14
- 120
- 217
2
votes
1 answer
When converting to git, how should I handle a single directory svn checkout?
I am soon going to be converting my part of an application from using an svn backed repository to using git one.
I've previously used git-svn, but the whole team is being moved to git and I've been asked to be in the vanguard of that move. Although…

Mark Booth
- 7,605
- 2
- 68
- 92
2
votes
2 answers
Gitlab CI and Git partial clone
I am testing the git partial clone feature on a large monorepo. A developer might run the following commands on his machine:
git clone --filter=blob:none --sparse THE_MONOREPO_URL.git
git sparse-checkout init --cone
git sparse-checkout set SOME…

Touloudou
- 2,079
- 1
- 17
- 28
2
votes
1 answer
Git and sparse-checkout on large monorepos - hiding irrelevant changes for a sparse-checkout specification? (git-diff, git-log, etc)
As git is increasingly advertised (and enhanced) to better support very large repositories (so-called "monorepos"), with major recent enhancements to the sparse-checkout workflow (git-sparse-checkout command and partial clone / promisors /…

Tao
- 13,457
- 7
- 65
- 76
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
how to skip invalid path when use git sparse-checkout init
the OS of my computer is windows, and file name in repo maybe invalid in windows, so I enable core.sparsecheckout and edit .git/info/sparse-checkout by hand to checkout specified directory, and it's worked well.
recently I updated git for windows…

litbear
- 806
- 1
- 6
- 17
2
votes
1 answer
How to read file content from git objects?
Having a sparsely checked out working tree,
I wish to parse the full git objects,
In order to be able to update sparse .git/info/sparse-checkout,
based on some business logic (which should not be relevant here).
I tried to find a command to checkout…

David Arnold
- 23
- 1
- 4
2
votes
1 answer
How do I check out only top level files from git?
I am trying to check out a specific file (.gitignore) committed to my git branch, and no other files.
I am able to use
git checkout origin/master "build/system/.gitignore",
but when I use
git checkout origin/master ".gitignore"
this doesn't work.
(I…

Chris Smith
- 574
- 4
- 11
2
votes
1 answer
How to checkout a nested folder as if was the root
I have a large legacy repo, of which I am only interested in the widgets directory. By using a git sparse checkout I am able to download only the folder I am interested in, which is nice.
My local repo now looks likes…

Buh Buh
- 7,443
- 1
- 34
- 61
2
votes
1 answer
Unignore directories in git-svn (adding directories to a sparse checkout)
When using git svn, a sparse checkout of the central repository may be achieved by something along the lines of
git clone -s URL-to-root --include-paths 'dir1|dir2|dir3'
After using this setup for some time, I would like to add another directory…

Ansa211
- 462
- 5
- 9
2
votes
2 answers
Mercurial sparse checkout
In this F8 conference video(starting 8:40) from 2015 they speak about the advantages of using Mercurial and a single repository across facebook.
How does this work in practice? Using Mercurial, can i checkout a subdirectory (live in SVN)? If so,…

Rentrop
- 20,979
- 10
- 72
- 100
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
2
votes
0 answers
How to place a directory from a .tar archive into a subversion sparsed checkedout working copy parent
Suppose you have a subversion repository with a directory /trunk/huge that is huge (thousands of files > 1G) and doesn't change very often.
You check it out sparsely avoiding /trunk/huge, e.g.
svn co --depth immediates ^/trunk trunk
for f in…

krico
- 5,723
- 2
- 25
- 28