C .GITIGNORE
GitHub’s official C .gitignore template.
GitHub’s official C .gitignore template. It is maintained in GitHub’s public template collection and released under CC0-1.0.
USE
- Copy it to the repository root as
.gitignore. - Merge it with project-specific patterns; later patterns take precedence.
- Commit the result so every contributor uses the same rules.
NOTES
- The template is a starting point; remove patterns you do not need.
- Generated files should usually stay untracked.
SOURCE
https://github.com/github/gitignore/blob/main/C.gitignore
FULL TEXT
# Prerequisites
*.d
# Object files
*.o
*.ko
*.obj
*.elf
# Linker output
*.ilk
*.map
*.exp
# Precompiled Headers
*.gch
*.pch
# Libraries
*.lib
*.a
*.la
*.lo
# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib
# Executables
*.exe
*.out
*.app
*.i*86
*.x86_64
*.hex
# Debug files
*.dSYM/
*.su
*.idb
*.pdb
# Kernel Module Compile Results
*.mod*
*.cmd
.tmp_versions/
modules.order
Module.symvers
Mkfile.old
dkms.conf
# debug information files
*.dwo
VERIFY SHA-256
Download the file, then choose it here. The checksum is compared locally in your browser.
Expected 1d12c3e3e1d5a30836fc5c5349701638765cd2601a356f2117104e15c555780d
CITE
C .GITIGNORE (v1.0, 2026-11-04). Original. https://original.wales/files/gitignore-c/ SHA-256: 1d12c3e3e1d5a30836fc5c5349701638765cd2601a356f2117104e15c555780d. Source: https://github.com/github/gitignore/blob/main/C.gitignore.