.gitignore for Angular + TypeScript

.gitignore for Angular applications with TypeScript compilation artifacts.

Quick presets

Selected (2)
AngularTypeScript
Your selections never leave your browser. Generation happens entirely client-side.
Raw

23 patterns · 439 B

# Generated by DevZone Tools — https://devzone.tools/tools/gitignore-generator
# Templates: TypeScript, Angular
# 2026-04-20

# ---- TypeScript ----
# TypeScript
*.js
*.js.map
*.d.ts
!src/**/*.d.ts
*.tsbuildinfo
dist/
out/

# ---- Angular ----
# Angular
tmp/
out-tsc/
.angular/
bazel-out/
node_modules/
npm-debug.log
yarn-error.log
.sass-cache/
/connect.lock
/coverage
/libpeerconnection.log
testem.log
/typings
.DS_Store
Thumbs.db
.env

Why use Angular + TypeScript together?

Angular is TypeScript-first, so these two templates naturally go together. The Angular template covers the Angular CLI build pipeline (dist/, .angular/ cache, out-tsc/). The TypeScript template adds *.tsbuildinfo incremental build info files.

The .angular/ build cache was introduced in Angular 13. It dramatically speeds up incremental builds but is machine-specific and should always be ignored.

Related combinations

Frequently asked questions

Do I need to commit .gitignore?
Yes — .gitignore should be committed to the repository so all collaborators benefit from the same ignore rules.
How do I add custom patterns?
Open your .gitignore file and add the pattern on a new line. Use # for comments, * for wildcards, / to match directories, and ! to un-ignore a previously ignored path.
How do I ignore a file that is already tracked?
Adding a file to .gitignore does not remove it from tracking if it was previously committed. Run: git rm --cached <file> to stop tracking it without deleting the file locally.
Why combine Angular and TypeScript?
Angular is TypeScript-first, so these two templates naturally go together. The Angular template covers the Angular CLI build pipeline (dist/, .angular/ cache, out-tsc/). The TypeScript template adds *.tsbuildinfo incremental build info files.

Looking for something else? Browse all templates →