Ignoring _generated in pull requests/git diff
Hey, does anybody know how to do this? It's suggested to not gitignore the
_generated
files for CI/CD reasons (and we concur with this), but we would still like to not have the files show up in our diffs for pull requests.
We tried putting the belowin a .gitattributes
file, but seems like that doesnt apply to github pull requests.
Anybody have some advice for this? Thanks! 🇩🇰
5 Replies
Thanks for posting in <#1088161997662724167>.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.
- Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
- Use search.convex.dev to search Docs, Stack, and Discord all at once.
- Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI.
- Avoid tagging staff unless specifically instructed.
Thank you!
Hmm. I believe there is a pragma or something you can put at the top of files so that github collapses it and reecognizes it as generated
@djbalin this thread seems to suggest a slight different entry format for .gitattributes: https://stackoverflow.com/questions/29053252/can-i-exclude-auto-generated-files-from-a-pull-request-in-github
Stack Overflow
Can I exclude auto-generated files from a pull request in GitHub?
Some pull request can get pretty large and often and I'd like to minimize noise for my team members that will be reviewing and merging my pull requests by removing auto-generated files.
For exampl...
maybe try that?
adding that
linguist-generated=true
might workThanks @jamwt , good find. Now the diff is collapsed/unrendered by default, that's nice :)) thanks