いくつかのチュートリアルを参考にして、git リポジトリ内の特定のフォルダーをスパース チェックアウトすることができました。
mkdir git-completion && cd git-completion
git init
git remote add –f origin https://github.com/git/git.git
git config core.sparsecheckout true
echo contrib/completion/ >> .git/info/sparse-checkout
git pull origin master
たとえば、このレポのフォルダーにある、、git-completion.bash
などgit-completion.tcsh
のスクリプトの後にいるとしましょう。contrib/completion
上記の sparse-checkout は目的のフォルダーを返しますが、ネストされたファイル構造を持っているようです:
git-completion/contrib/completion/git-completion.bash
代わりにファイルを親ディレクトリにプルすることは可能ですか?
git-completion/git-completion.bash