Generated _templ.go files are deterministic output from .templ sources, same as output.css from input.css. Remove them from version control to reduce diff noise and merge conflicts. Add build:templ and live:templ tasks to the Taskfile so generation happens as part of the build.
37 lines
591 B
Plaintext
37 lines
591 B
Plaintext
# Allowlisting gitignore: ignore everything, then un-ignore what we track.
|
|
# source: https://github.com/github/gitignore/blob/main/community/Golang/Go.AllowList.gitignore
|
|
|
|
# Ignore everything
|
|
*
|
|
|
|
# But not these files...
|
|
!.gitignore
|
|
|
|
!*.go
|
|
!*.templ
|
|
!*.sql
|
|
!go.sum
|
|
!go.mod
|
|
!Taskfile.yml
|
|
!sqlc.yaml
|
|
!.golangci.yml
|
|
!.gitea/workflows/*.yml
|
|
|
|
!.env.example
|
|
!LICENSE
|
|
|
|
!assets/**/*
|
|
|
|
# Generated files stay out of version control
|
|
*_templ.go
|
|
assets/css/output.css
|
|
|
|
# Deploy scripts and configs
|
|
!deploy/*.sh
|
|
!deploy/*.service
|
|
!docker-compose.yml
|
|
!Dockerfile
|
|
|
|
# ...even if they are in subdirectories
|
|
!*/
|