sparse-checkout

error: Sparse checkout leaves no entry on working directory

断了今生、忘了曾经 提交于 2019-12-10 15:31:55
问题 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 leaves no entry on working directory I have this 60GB repository, which I need to clone. I need only a part of it, so to save a disk space I wanted to use sparse checkout. This is what I do: mkdir repoDir git init repoDir cd repoDir git remote add

Exclude directory during jenkins checkout

断了今生、忘了曾经 提交于 2019-12-10 13:08:32
问题 I have 20 directories under trunk /trunk/a1 /trunk/a2 /trun/a3 .. .. /trunk/a20 How to exclude (not include) some (arbitrary directories during Jenkins checkout. For example, I want to have all the directories under trunk except /trunk/a3/b1 How to do this? I already found an answer in SVN checkout ignore folder but this is not possible under Jenkins. Need a much simpler solution where I don't know the number of directories under trunk except the one I want to exclude. Also how to add a

Shallow AND Sparse GIT Repository Clone

ぃ、小莉子 提交于 2019-12-07 19:37:39
问题 I have a shallow cloned git repository that is over 1 GB. I use sparse checkout for the files/dirs needed. How can I reduce the repository clone to just the sparse checkout files/dirs? Initially I was able to limit the cloned repository to only the sparse checkout by disabling checkout when cloning. Then setting up sparse checkout before doing the initial checkout. This limited the repository to only about 200 MB. Much more manageable. However updating remote branch info at some point in the

Git sparse checkout without leading directories [duplicate]

别来无恙 提交于 2019-12-04 22:24:41
问题 This question already has answers here : Checkout subdirectories in Git? (8 answers) Closed 3 years ago . I understand how to configure a sparse checkout in Git, but I was wondering if it's possible to eliminate the leading directories. For example, say I have a Git repository with a folder structure like so: folder1/foo folder2/foo/bar/stuff folder3/another/foo/bar/stuff2 And I only want the contents inside stuff2 . For sparse checkout of those directories, the .git/info/spare-checkout file

Git sparse checkout without leading directories [duplicate]

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-03 14:35:26
This question already has an answer here: Checkout subdirectories in Git? 8 answers I understand how to configure a sparse checkout in Git, but I was wondering if it's possible to eliminate the leading directories. For example, say I have a Git repository with a folder structure like so: folder1/foo folder2/foo/bar/stuff folder3/another/foo/bar/stuff2 And I only want the contents inside stuff2 . For sparse checkout of those directories, the .git/info/spare-checkout file would look like this: folder3/another/foo/bar/stuff2/ My problem is after I'm finished with the sparse checkout, I don't see

How do I implement sparse checkout in JGit?

邮差的信 提交于 2019-12-01 12:52:01
问题 I need to pull the contents of a specific sub directory in a Github Repository and put it under my own directory. After much research, it seems sparse checkouts is the way to go. However, I am a little unsure, as to how to implement this using JGit. 回答1: 1) You cannot clone only part of a repo -- for example, a repo with lib and Tests but you want to clone only the lib portion. 2) You can use "git clone --depth DEPTH ..." to clone only DEPTH revisions back, but you still get the whole repo,

sparse svn update of deep directory structure

情到浓时终转凉″ 提交于 2019-12-01 09:22:56
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 trying to do the following: svn checkout "http://myRepo.com/trunk" --depth empty "myRepo" svn update --set-depth empty project1/dirs/moreDirs/evenMore/file.xml I tried this but got an error saying it was skipping updating that file. If I manually do the following I can get the file in my checkout (I want a --set-depth empty that gets the parent

Change depth in existing SVN working copy without redownloading

萝らか妹 提交于 2019-11-30 11:49:11
问题 I have a working copy of an entire SVN repository, but I want to change it into a sparse working copy because of disk space issues. One way to do this would be: svn up --set-depth immediates projects svn up --set-depth infinity projects/project1 svn up --set-depth infinity projects/project2 However, that would first delete project1 and project2 , then redownload them. This is really inconvenient, because they're very large and the server's upload speed is very low. I tried this (with another,

Why do excluded files keep reappearing in my git sparse checkout?

徘徊边缘 提交于 2019-11-27 23:38:40
I use the GCC git mirror and because I only use the C and C++ front ends I use git's sparse checkout feature to exclude the hundreds of files I don't need: $ git config core.sparseCheckout true $ cat .git/info/sparse-checkout /* !gnattools/ !libada/ !libgfortran/ !libgo/ !libjava/ !libobjc/ !libquadmath/ !gcc/ada/ !gcc/fortran/ !gcc/go/ !gcc/java/ !gcc/objc/ !gcc/objcp/ !gcc/testsuite/ada/ !gcc/testsuite/gfortran.dg/ !gcc/testsuite/gfortran.fortran-torture/ !gcc/testsuite/gnat.dg/ !gcc/testsuite/go.dg/ !gcc/testsuite/go.go-torture/ !gcc/testsuite/go.test/ !gcc/testsuite/objc/ !gcc/testsuite

Cloning only a subdirectory with git [duplicate]

…衆ロ難τιáo~ 提交于 2019-11-27 10:18:22
问题 This question already has an answer here: How do I clone a subdirectory only of a Git repository? 13 answers I have a git repository that includes subdirectories. Example dirA/dirB. Is there any way to do a git clone on a Unix server to pull only files from a subdirectory (dirB)? Is there some other git command other than clone that will do this? How do I git a specific file? 回答1: If you want to clone only parts of your repository, you should look at git submodules. The subdirectory is