---
title: "C++ .GITIGNORE"
category: SNIPPETS
date: 2026-11-04
version: "1.0"
format: "TXT"
size: "633 B"
license: "CC0-1.0"
sha256: 3f81ebc82c21e07e8da6423d679e6231d473d892a99d6335af49eea4c754ac27
source: "https://github.com/github/gitignore/blob/main/C++.gitignore"
download: "https://original.wales/files/snippets/cpp.gitignore"
tags: ["GITIGNORE","GIT","CPP","OFFICIAL"]
summary: "GitHub’s official C++ .gitignore template."
canonical: "https://original.wales/files/gitignore-cpp/"
---

# C++ .GITIGNORE

GitHub’s official C++ .gitignore template.

## TEXT

# Prerequisites
*.d

# Compiled Object files
*.slo
*.lo
*.o
*.obj

# Precompiled Headers
*.gch
*.pch

# Linker files
*.ilk

# Debugger Files
*.pdb

# Compiled Dynamic libraries
*.so
*.dylib
*.dll
*.so.*

# Fortran module files
*.mod
*.smod

# Compiled Static libraries
*.lai
*.la
*.a
*.lib

# Executables
*.exe
*.out
*.app

# Build directories
build/
Build/
build-*/

# CMake generated files
CMakeFiles/
CMakeCache.txt
cmake_install.cmake
Makefile
install_manifest.txt
compile_commands.json

# Temporary files
*.tmp
*.log
*.bak
*.swp

# vcpkg
vcpkg_installed/

# debug information files
*.dwo

# test output & cache
Testing/
.cache/

## SOURCE

https://github.com/github/gitignore/blob/main/C++.gitignore
