Back to Templates
Go .gitignore Template
Go project template
5K downloads
4.5/5.0
Updated 2024-01
.gitignore
33 lines# 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
*.out
coverage.*
*.coverprofile
profile.cov
# Dependency directories (remove the comment below to include it)
# vendor/
# Go workspace file
go.work
go.work.sum
# env file
.env
# Editor/IDE
# .idea/
# .vscode/
How to Use This Template
- Copy the template content above
- Create a new file named
.gitignorein your project root - Paste the content into the file
- Customize the patterns for your specific project needs
- Commit the .gitignore file to your repository