.gitignore for Delphi

31 ignore rules for Delphi, ready to copy into your repository.

Object Pascal development environment

The complete .gitignore for Delphi

# Generated by LFGitignore - https://lfgitignore.com
# Created: 2026-08-05 01:28:53 UTC
# Technologies: Delphi

### Delphi ###
# Windows executable
*.exe
# Dynamic link library
*.dll
*.bpl
*.bpi
*.dcp
# Shared object
*.so
# Android package
*.apk
*.drc
*.map
*.dres
*.rsm
*.tds
*.dcu
# Library file
*.lib
# Static library
*.a
# Object file
*.o
*.ocx
*.cfg
*.hpp
*Resource.rc
*.local
*.identcache
*.projdata
*.tvsconfig
*.dsk
*.dsv
__history/
__recovery/
*.~*
*.stat
modules/

What these Delphi rules actually ignore

Every pattern below, and why it belongs in your .gitignore.

Delphi compiler-generated binaries (safe to delete)

Pattern What it ignores
*.exe Windows executable
*.dll Dynamic link library
*.bpl Delphi compiler-generated binaries (safe to delete)
*.bpi Delphi compiler-generated binaries (safe to delete)
*.dcp Delphi compiler-generated binaries (safe to delete)
*.so Shared object
*.apk Android package
*.drc Delphi compiler-generated binaries (safe to delete)
*.map Delphi compiler-generated binaries (safe to delete)
*.dres Delphi compiler-generated binaries (safe to delete)
*.rsm Delphi compiler-generated binaries (safe to delete)
*.tds Delphi compiler-generated binaries (safe to delete)
*.dcu Delphi compiler-generated binaries (safe to delete)
*.lib Library file
*.a Static library
*.o Object file
*.ocx Delphi compiler-generated binaries (safe to delete)

Delphi autogenerated files (duplicated info)

Pattern What it ignores
*.cfg Delphi autogenerated files (duplicated info)
*.hpp Delphi autogenerated files (duplicated info)
*Resource.rc Delphi autogenerated files (duplicated info)

Delphi local files (user-specific info)

Pattern What it ignores
*.local Delphi local files (user-specific info)
*.identcache Delphi local files (user-specific info)
*.projdata Delphi local files (user-specific info)
*.tvsconfig Delphi local files (user-specific info)
*.dsk Delphi local files (user-specific info)
*.dsv Delphi local files (user-specific info)

Delphi history and backups

Pattern What it ignores
__history/ Delphi history and backups
__recovery/ Delphi history and backups
*.~* Delphi history and backups

Castalia statistics file (since XE7 Castalia is distributed with Delphi)

Pattern What it ignores
*.stat Castalia statistics file (since XE7 Castalia is distributed with Delphi)

Boss dependency manager vendor folder https://github.com/HashLoad/boss

Pattern What it ignores
modules/ Boss dependency manager vendor folder https://github.com/HashLoad/boss

How to use this .gitignore for Delphi

  1. Copy the Delphi rules above, or download the file directly.
  2. Create a file named .gitignore at the root of your Git repository and paste the rules into it.
  3. If some of those files are already tracked, run git rm -r --cached . then commit again — Git only applies ignore rules to untracked files.
  4. Commit the .gitignore so everyone on the team shares the same rules.

Other Language .gitignore templates

See every Language template