Ent: Should I exclude the files generated by entc from vcs?

Created on 25 Dec 2020  Â·  2Comments  Â·  Source: ent/ent

After execute go generate ./ent, there are lots of files generated.

Should I exclude these files from vcs? Such as put the content below to ./ent/.gitignore

*
!generate.go
!schema/

Or keep them in vcs?

Which is best practice?

Question

Most helpful comment

Hey @YianAndCode,
I'm not aware on any best practice, but from my experience, it's pretty common (in Go) to keep the generated assets in VCS. Not only for ent, but for other projects as well (e.g. gqlgen, protobuf, go-swagger, etc).

GitHub PR diff works with it really well BTW.

All 2 comments

Hey @YianAndCode,
I'm not aware on any best practice, but from my experience, it's pretty common (in Go) to keep the generated assets in VCS. Not only for ent, but for other projects as well (e.g. gqlgen, protobuf, go-swagger, etc).

GitHub PR diff works with it really well BTW.

Hi @a8m,
I got it, thank you very much!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

juanpabloaj picture juanpabloaj  Â·  3Comments

tomakado picture tomakado  Â·  4Comments

ernado picture ernado  Â·  3Comments

ernado picture ernado  Â·  4Comments

satriahrh picture satriahrh  Â·  3Comments