Go .gitignore Template
Go compiled binaries, test artifacts, and workspace configuration. Generated and merged deterministically with upstream GitHub repository patterns to keep your repository clean of package directories, temporary build artifacts, and local environment files.
Interactive Stack Generator
Preconfigured with GoGo compiled binaries, test artifacts, and workspace configuration
### Go #### If you prefer the allow list template instead of the deny list, see community template:# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore## Binaries for programs and plugins*.exe*.exe~*.dll*.so*.dylib # Test binary, built with `go test -c`*.test # Code coverage profiles and other test artifacts*.outcoverage.**.coverprofileprofile.cov # Dependency directories (remove the comment below to include it)# vendor/ # Go workspace filego.workgo.work.sum # env file.env # Editor/IDE# .idea/# .vscode/ Raw Go .gitignore
Crawlable upstream source template# If you prefer the allow list template instead of the deny list, see community template:# https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore## Binaries for programs and plugins*.exe*.exe~*.dll*.so*.dylib # Test binary, built with `go test -c`*.test # Code coverage profiles and other test artifacts*.outcoverage.**.coverprofileprofile.cov # Dependency directories (remove the comment below to include it)# vendor/ # Go workspace filego.workgo.work.sum # env file.env # Editor/IDE# .idea/# .vscode/ Key Pattern Breakdown
Build Outputs & Compiled Artifacts
Generated binary files, compilation targets, and distribution bundles that can be reliably reproduced from source.
Environment Secrets & Local Overrides
Local environment configurations, secrets, and credentials intended to protect developer-specific settings from exposure.
Execution Caches & Runtime Logs
Diagnostic logs, runtime metadata, test coverage reports, and incremental compiler caches that cause noisy repository diffs.
Source & Verification
Place this file in the root directory of your project as .gitignore. Changes take effect on newly added or untracked files.