Skip to content

Latest commit

 

History

History
31 lines (20 loc) · 656 Bytes

File metadata and controls

31 lines (20 loc) · 656 Bytes

git-folder-here

Clone a GitHub subfolder into the current directory without cloning the full working tree.

Install

curl -fsSL https://raw.githubusercontent.com/akhileshu/git-folder-here/main/install.sh | bash

Usage

git-folder-here https://github.com/akhileshu/boilerplates-and-snippets/tree/main/next-express/src

The script:

  • clones only the requested path with sparse checkout
  • keeps the folder itself, not just its contents
  • appends a timestamp if the destination name already exists

Test

bash tests/smoke.sh

The smoke test runs the executable through both bash and zsh.

git-folder-here