Release Notes
This is the initial release of degit, a command-line scaffolding tool that lets developers instantly download a clean copy of any public Git repository without its history. It supports multiple Git hosting providers and offers both a CLI and a programmatic Node.js API for flexible integration.
New features
- Clone repositories without historyDownload a clean snapshot of any public Git repository (GitHub, GitLab, Bitbucket, Sourcehut) instantly, without cloning the full Git history. Use it as a project starting point: `degit user/repo my-project`.
- Multiple Git host supportSupports GitHub, GitLab, Bitbucket, and Sourcehut out of the box. Specify a host explicitly (e.g., `degit gitlab:user/repo`) or let degit infer it from the URL.
- Branch, tag, and commit targetingClone a specific branch, tag, or commit hash by appending it with `#`: `degit user/repo#dev`, `degit user/repo#v1.2.3`, or `degit user/repo#abc1234`.
- Subdirectory supportClone only a subdirectory of a repository by specifying the path: `degit user/repo/path/to/subdir`.
- Programmatic Node.js APIUse degit as a library in your Node.js applications. Example: ```js import degit from 'degit'; const emitter = degit('user/repo', { cache: true, force: true, verbose: true }); await emitter.clone('path/to/dest'); ```
- Actions system (post-clone hooks)Define actions in a `degit.json` file at the root of a template repository to automate post-clone steps such as cloning additional repositories or removing files.
- Local caching of tarballsDownloaded tarballs are cached locally to speed up repeated use of the same template. Use the `--cache` flag to force use of a cached version even if a newer commit exists.
- Force-overwrite destinationUse the `--force` flag to clone into a non-empty destination directory, overwriting existing files.
- Verbose and debug modesUse `--verbose` for detailed output during cloning, helpful for diagnosing issues or understanding what degit is doing under the hood.
- SSH and HTTPS URL supportAccepts full Git URLs in addition to shorthand `user/repo` notation, supporting both HTTPS and SSH formats.
