たくさんのプロジェクトのレポがあります。私はレポ内の「オラクル」プロジェクトにのみ関心があります。ただし、コードベースをプルダウンすると、他のフォルダー内に「oracle」というサブディレクトリが見つかりました。一致する親フォルダーのみを取得する方法はありますか?
git init <repo>
cd <repo>
git remote add -f origin <url>
git config core.sparseCheckout true
echo "oracle/" >> .git/info/sparse-checkout
出力
#ls -l
oracle
directory123
directoryabc
#find . | grep "oracle"
directory123/sub1/sub2/oracle
directoryabc/sub1/sub2/sub3/oracle