137 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
0
answers
63
views
Git blame with historical blob data back to a specific commit pre-fetched in a sparsely checked out repo
I am trying to achieve a combination of
operating in a sparsely checked out repo
being able to run a git blame operation with line details - but not triggering a network fetch for each historical ...
0
votes
0
answers
87
views
Is it possible to apply git sparse-checkout on files not directories?
I have a repo I would like to clone with a structure like this:
repo/folder1
repo/folder2
repo/file1
repo/file2
I want to keep folder1 and nothing else.
When I try git sparse-checkout init --cone, it ...
1
vote
1
answer
164
views
Git clone and download only the files that need changed and committed
We have a repository with several large sql files, ranging from 100MB to 10GB in size.
Been trying to setup local cloning so we only download the sql file(s) that need changed and committed at any ...
0
votes
2
answers
45
views
browse sparse git checkout
In a sparse git checkout, one does not see the folders (directories/trees) that haven't been added via git sparse-checkout add.
I can still "browse" these folders with git cat-file -p HEAD ...
2
votes
0
answers
49
views
Mercurial: get only a specific, nested folder from a subrepo
I'm aware that similar questions have been asked in the past, however, since the newest of them are pushing on being a decade old, I feel it's reasonable to try again with my particular problem.
I ...
0
votes
1
answer
156
views
How to sparse pull from a repo while full push/pull to/from another?
I don't know if I am making things clear or not (since I am not an advances git user), so please ask follow up questions to better understand where I'm coming from.
Consider this repo: Void Linux ...
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 ...
0
votes
0
answers
43
views
Clone a folder of a git repository, mapping it to a different local path
Suppose, my remote git repository looks like this:
Repository
├── Folder1
│ ├── p1.py
│ └── p2.py
├── Folder2
│ └── p3.py
├── file1
└── file2
I want to download only the descendants of Folder1, ...
1
vote
0
answers
87
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 ...
2
votes
1
answer
1k
views
How to get past git giving hint to "disable or modify the sparsity rules" when "worktree is not sparse"?
I rarely use a sparse checkout (more likely to use a shallow clone). I almost always use a .gitignore file. That file is sometimes configured to ignore directories or files that are already part of ...
1
vote
0
answers
53
views
How to clone only a git subdirectory and get the date/time of the last commit into that subdirectory
As a (late) followup on How do I clone a subdirectory only of a Git repository?, I additionally need the date and time of the latest commit in that subdirectory. However, the --depth=1 command only ...
0
votes
1
answer
352
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 ...
1
vote
1
answer
75
views
How to generate a tree hash of a git sparse checkout?
You can get the hash of a tree in a commit by doing:
git rev-parse 'HEAD^{tree}'
And you can get the hash of the tree in the index by doing:
git write-tree
However, in the case you did a sparse ...
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
...