# rich-harris/degit

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/rich-harris-degit).**

7,883 stars · 279 forks · TypeScript · MIT

## Links

- GitHub: https://github.com/Rich-Harris/degit
- awesome-repositories: https://awesome-repositories.com/repository/rich-harris-degit.md

## Description

degit is a Git project scaffolder and repository downloader that initializes new projects from remote Git templates. It fetches the latest commit of a repository as a clean snapshot, stripping all version control history and metadata to provide a fresh starting point.

The tool supports fetching specific branches, tags, or commit hashes to ensure the project uses a precise source version. It can also perform subdirectory extraction, allowing the download of a specific folder from a remote source rather than the entire project tree.

The utility includes a local snapshot cache to accelerate future retrievals and supports secure authentication via HTTPS or SSH to access private repositories. It further provides mechanisms for post-extraction hook execution to run cleanup scripts after the project is unpacked.

## Tags

### Development Tools & Productivity

- [Project Scaffolders](https://awesome-repositories.com/f/development-tools-productivity/project-scaffolding-config-code-generation/project-scaffolding-configuration/project-scaffolding/project-scaffolders.md) — Creates a new project directory by downloading a remote repository snapshot as a clean starter. ([source](https://github.com/rich-harris/degit#readme))
- [Latest Commit Resolution](https://awesome-repositories.com/f/development-tools-productivity/commit-identifiers/latest-commit-resolution.md) — Queries remote providers to resolve the latest commit hash before fetching the source archive.
- [Project Bootstrapping Templates](https://awesome-repositories.com/f/development-tools-productivity/project-bootstrapping-templates.md) — Initializes new projects using remote Git repositories as blueprints while removing metadata.
- [Template-Based Project Scaffolders](https://awesome-repositories.com/f/development-tools-productivity/project-templates/template-based-project-scaffolders.md) — Generates new projects from remote repository templates while stripping all version control history.
- [Remote Source Extraction](https://awesome-repositories.com/f/development-tools-productivity/remote-source-extraction.md) — Downloads specific branches or subdirectories from a remote repository to use as a local starting point.
- [Repository Archive Downloaders](https://awesome-repositories.com/f/development-tools-productivity/repository-archive-downloaders.md) — Fetches specific branches, tags, or commit hashes from Git hosts as compressed archives.
- [Source Version Fetching](https://awesome-repositories.com/f/development-tools-productivity/source-version-fetching.md) — Allows downloading a precise tag, branch, or commit hash to ensure the project uses a specific version. ([source](https://github.com/rich-harris/degit#readme))
- [Tarball Snapshots](https://awesome-repositories.com/f/development-tools-productivity/tarball-snapshots.md) — Downloads compressed archives of specific commits to provide a clean snapshot without git history.
- [Repository Cache Managers](https://awesome-repositories.com/f/development-tools-productivity/git-repository-integrators/git-repository-integrators/repository-cache-managers.md) — Stores downloaded repository archives locally to accelerate future project retrievals and support offline access. ([source](https://github.com/rich-harris/degit#readme))
- [Private Repository Authentication](https://awesome-repositories.com/f/development-tools-productivity/private-repository-authentication.md) — Provides secure credential handling to download archives from private repositories via HTTPS or SSH.
- [Subdirectory Extraction](https://awesome-repositories.com/f/development-tools-productivity/subdirectory-extraction.md) — Enables the download of a specific folder from a remote source to avoid pulling the entire project tree. ([source](https://github.com/rich-harris/degit#readme))

### Web Development

- [Project Initializers](https://awesome-repositories.com/f/web-development/full-stack-frameworks/project-initializers.md) — Rapidly bootstraps new project structures by using cached remote repository archives.

### Artificial Intelligence & ML

- [Boilerplate Distributions](https://awesome-repositories.com/f/artificial-intelligence-ml/ai-agent-skills/shared-skill-distribution/template-repository-distributions/boilerplate-distributions.md) — Distributes starter code and project structures via Git repositories while keeping the local copy clean.

### Data & Databases

- [Archive Caches](https://awesome-repositories.com/f/data-databases/data-caching/local-data-caches/archive-caches.md) — Stores downloaded repository snapshots in a local directory to avoid redundant network requests.
- [Repository Snapshot Caches](https://awesome-repositories.com/f/data-databases/data-engineering-infrastructure/caching-performance/caching/git-object-caches/repository-snapshot-caches.md) — Provides a local storage system for repository archives to speed up project template retrieval.

### Security & Cryptography

- [Private Repository Access](https://awesome-repositories.com/f/security-cryptography/private-repository-access.md) — Implements secure fetching of source files from private repositories using HTTPS or SSH authentication. ([source](https://github.com/rich-harris/degit#readme))

### Part of an Awesome List

- [Git Utilities](https://awesome-repositories.com/f/awesome-lists/devtools/git-utilities.md) — Git repository cloning for scaffolding.
