Skip to content

Do people check their generated files into Git? #4253

Answered by dotansimha
colinhacks asked this question in General
Discussion options

You must be logged in to vote

Hi @vriad !

Personally, I prefer not to put generated files under source control. It bloats the repository and increase the size. It also causes merge conflicts in a lot of cases.
When possible (for example: your schema is available without running the server), I prefer to run Codegen as part of the CI and build system.

I usually create pre script (in package.json) for my start and build commands, so if you switch branch, it will run codegen again right before running the actual project. This way you avoid the need to run it manually or remember to run it after changing branches.

Replies: 4 comments 8 replies

Comment options

You must be logged in to vote
7 replies
@jamesonhill
Comment options

@dotansimha
Comment options

@Axedyson
Comment options

@eremzeit
Comment options

@q3769-patientpoint
Comment options

Answer selected by colinhacks
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@eremzeit
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
8 participants