git-sparse-checkout

Git sparse checkout error “Entry 'path/to/file' not update. Cannot update sparse checkout”

*爱你&永不变心* 提交于 2021-02-08 07:32:35
问题 I've just done a sparse checkout following the steps below git clone http://location/repo.git # create .git/info/sparse-checkout file git config --bool core.sparsecheckout true git read-tree -mu HEAD Unfortunately the final step fails with the error message Entry 'path/to/file' not update. Cannot update sparse checkout Which is strange because (1) path/to/file exists (2) the sparse checkout process succeeded on another machine git version 1.7.1 (Centos 6). The current machine is a Centos 7

Git sparse checkout error “Entry 'path/to/file' not update. Cannot update sparse checkout”

耗尽温柔 提交于 2021-02-08 07:32:10
问题 I've just done a sparse checkout following the steps below git clone http://location/repo.git # create .git/info/sparse-checkout file git config --bool core.sparsecheckout true git read-tree -mu HEAD Unfortunately the final step fails with the error message Entry 'path/to/file' not update. Cannot update sparse checkout Which is strange because (1) path/to/file exists (2) the sparse checkout process succeeded on another machine git version 1.7.1 (Centos 6). The current machine is a Centos 7

git sparse-checkout ignore specific file type

北城余情 提交于 2021-02-08 06:10:11
问题 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 following: git clone --no-checkout https://github.com/john_doe/repo-with-big-csv.git cd repo-with-big-csv git sparse-checkout init --cone Then I edit the .git/info/sparse-checkout and add the following (adapted from example in page above): /* !**/*

git sparse-checkout ignore specific file type

淺唱寂寞╮ 提交于 2021-02-08 06:07:58
问题 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 following: git clone --no-checkout https://github.com/john_doe/repo-with-big-csv.git cd repo-with-big-csv git sparse-checkout init --cone Then I edit the .git/info/sparse-checkout and add the following (adapted from example in page above): /* !**/*

How do I clone, fetch or sparse checkout a single directory or a list of directories from git repository?

流过昼夜 提交于 2020-02-15 06:42:04
问题 How do I clone, fetch or sparse checkout a single file or directory or a list of files or directories from a git repository avoiding downloading the entire history or at least keeping history download at minimum? For the benefit of people landing here, these are references to other similar questions: How do I clone a subdirectory only of a Git repository? How to sparsely checkout only one single file from a git repository? These similar questions were asked some 10 years ago and git evolved

How to do submodule sparse-checkout with Git?

匆匆过客 提交于 2019-12-07 23:55:52
问题 There are a lot of articles and SO questions about sparse-checkout. Unfortunately I did not find concrete examples. I would like to get this following example work: Create a submodule cd ~ mkdir sub && cd $_ git init mkdir foo && touch $_/foo mkdir bar && touch $_/bar git add . git commit -am "Initial commit" Create a project cd ~ mkdir project && cd $_ git init git submodule add ../sub sub git config -f .gitmodules submodule.sub.shallow true git config -f .gitmodules submodule.sub

How to do submodule sparse-checkout with Git?

非 Y 不嫁゛ 提交于 2019-12-06 14:08:36
There are a lot of articles and SO questions about sparse-checkout. Unfortunately I did not find concrete examples. I would like to get this following example work: Create a submodule cd ~ mkdir sub && cd $_ git init mkdir foo && touch $_/foo mkdir bar && touch $_/bar git add . git commit -am "Initial commit" Create a project cd ~ mkdir project && cd $_ git init git submodule add ../sub sub git config -f .gitmodules submodule.sub.shallow true git config -f .gitmodules submodule.sub.sparsecheckout true echo foo/* > .git/modules/sub/info/sparse-checkout git commit -am "Initial commit" git

Retrieve a single file from a repository

橙三吉。 提交于 2019-11-26 02:16:17
问题 What is the most efficient mechanism (in respect to data transferred and disk space used) to get the contents of a single file from a remote git repository? So far I\'ve managed to come up with: git clone --no-checkout --depth 1 git@github.com:foo/bar.git && cd bar && git show HEAD:path/to/file.txt This still seems overkill. What about getting multiple files from the repo? 回答1: in git version 1.7.9.5 this seems to work to export a single file from a remote git archive --remote=ssh://host