38 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
2
votes
1
answer
71
views
In Windows Git Sparse Checkout does not work as expected and downloads unwanted files
I have a folder structure in a Git Repo like the following:
.
└── top_level/
├── invalid_file_names/
│ ├── <?>.txt
│ └── <<>>?.txt
└── valid_files/
├── ...
0
votes
0
answers
73
views
Git push sparse repository
I'm trying to customize a small part of a big repository, then have my customization pushed into a GitHub repository.
I've followed sparse cloning instructions to have the first stage done. Committed ...
1
vote
0
answers
86
views
Is it possible to push git sparse-checkout settings, so every team member has the same settings by default?
I am currently introducing a library from repository "B" to repository "A" as a submodule.
The Repository "B" referred to as a submodule includes additional test code and ...
1
vote
0
answers
47
views
Integrating Specific Subfolder from One Git Repository into Another Without Full Clone
I'm currently working on a project where I need to integrate a specific subfolder (folder F) from a repository (RepoA) into another repository (RepoB). I tried using git subtree and submodules, but ...
4
votes
1
answer
57
views
Git checkout with exclusions fails when branch isn't local
I'm trying to checkout a branch, but want to exclude the REAMDE.md and CHANGELOG.md files.
Working:
git clone [url] --no-checkout .
git checkout BranchnameA
git checkout BranchnameB # (any other ...
0
votes
1
answer
268
views
When doing a shallow git clone, how to limit git blame to the depth of the clone?
I have a short-lived process which does a shallow clone (e.g. git clone --depth 50 <repo>) of a huge repo with ancient history.
Part of the process, in some conditions, it uses runs git blame on ...
0
votes
1
answer
350
views
How to use git sparse-checkout with multiple matching patterns
I'm using git sparse-checkout to have only the files I'm interested in on disk. I'm unable to figure out how to match multiple patterns.
git sparse-checkout set --no-cone "**/*.tf"
Checkout ...
3
votes
1
answer
2k
views
How to undo git sparse-checkout add
Let's say I did a sparse checkout of a partial clone to not get everything from a big Git repo:
git clone --filter=blob:none --sparse https://example.com/url/of/my/repo.git
cd repo
git sparse-checkout ...
-2
votes
1
answer
1k
views
Clone a subdirectory from github using git
In git I want to download a folder from a Github repository and add it to a subdirectory in my repo like so:
repo/folder/subfolder/
repo/folder/subfolder/clonedfolder //cloned folder from git hub
But ...
3
votes
1
answer
658
views
Git sparse checkout^ some root folders fully recursive, some other root folders without subfolders
I use git 2.40 and I have repo folder structure like this:
└── root_dir1
│ ├── dir11
│ │ └── file11
│ │
│ └── dir12
│ │ └── file12
│ │
│ └── file13
│
└── root_dir2
...
0
votes
1
answer
546
views
Jenkins Git Sparsecheckout multiple repositories
I'm trying to setup a shared library within Jenkins that would have multiple git repositories and then multiple directory paths? Is this even possible? I've looked around a bit and the example's I ...
8
votes
1
answer
3k
views
How to prevent git clone --filter=blob:none --sparse from downloading files on the root directory?
As explained at How do I clone a subdirectory only of a Git repository? the best way I've found so far to download all files in a Git subdirectory only is:
git clone --depth 1 --filter=blob:none --...
8
votes
1
answer
3k
views
failed to initialize sparse-checkout
I'm getting the below error when i try to clone a folder "banana" from git repository using sparse filter;
git clone --depth 1 --filter=blob:none --sparse https://github.com/gitexpert/...
2
votes
0
answers
7k
views
how to clone specific folder from git using --sparse
git version 2.25.1
I'm trying to clone only a specific directory from the git repository using the below command ;
git clone --depth 1 --filter=blob:none --sparse https://github.com/gitexpert/...
0
votes
1
answer
406
views
git sparse-checkout existing repo serially
Here is what I am doing
First sparse-check-out
git clone --depth 1 --filter=blob:none --sparse https:<repo_path>
cd ./<local_repo_path>
git sparse-checkout init --cone
git sparse-...