.gitignore for Lua
27 ignore rules for Lua, ready to copy into your repository.
Lightweight embeddable scripting language
The complete .gitignore for Lua
# Generated by LFGitignore - https://lfgitignore.com
# Created: 2026-08-05 01:27:17 UTC
# Technologies: Lua
### Lua ###
luac.out
# Object file
*.o
*.src.rock
*.ko
# ZIP archive
*.zip
# Object file
*.obj
# Gzipped tar archive
*.tar.gz
*.elf
*.gch
*.os
*.pch
# Library file
*.lib
# Static library
*.a
*.la
*.lo
# Dynamic link library
*.dll
*.def
# Shared object
*.so
*.exp
# Versioned shared object
*.so.*
# macOS dynamic library
*.dylib
# Windows executable
*.exe
# Compiler output
*.out
# Application bundle
*.app
# 32-bit x86 binary
*.i*86
# 64-bit x86 binary
*.x86_64
# Hex dump file
*.hex
What these Lua rules actually ignore
Every pattern below, and why it belongs in your .gitignore.
Compiled Lua sources
| Pattern | What it ignores |
|---|---|
luac.out |
Compiled Lua sources |
*.src.rock |
luarocks build files |
*.zip |
ZIP archive |
*.tar.gz |
Gzipped tar archive |
Object files
| Pattern | What it ignores |
|---|---|
*.o |
Object file |
*.ko |
Object files |
*.obj |
Object file |
*.elf |
Object files |
*.os |
Object files |
Precompiled Headers
| Pattern | What it ignores |
|---|---|
*.gch |
Precompiled Headers |
*.pch |
Precompiled Headers |
Libraries
| Pattern | What it ignores |
|---|---|
*.lib |
Library file |
*.a |
Static library |
*.la |
Libraries |
*.lo |
Libraries |
*.def |
Libraries |
*.exp |
Libraries |
Shared objects (inc. Windows DLLs)
| Pattern | What it ignores |
|---|---|
*.dll |
Dynamic link library |
*.so |
Shared object |
*.so.* |
Versioned shared object |
*.dylib |
macOS dynamic library |
Executables
| Pattern | What it ignores |
|---|---|
*.exe |
Windows executable |
*.out |
Compiler output |
*.app |
Application bundle |
*.i*86 |
32-bit x86 binary |
*.x86_64 |
64-bit x86 binary |
*.hex |
Hex dump file |
How to use this .gitignore for Lua
- Copy the Lua rules above, or download the file directly.
- Create a file named .gitignore at the root of your Git repository and paste the rules into it.
- If some of those files are already tracked, run git rm -r --cached . then commit again — Git only applies ignore rules to untracked files.
- Commit the .gitignore so everyone on the team shares the same rules.