Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update generated files list and add
diff=generatedattribute #30745Update generated files list and add
diff=generatedattribute #30745Changes from all commits
e2f1b8f4d076921022187e81edae246ba2dcde22e67f240e46ab18ef8cf4889b2054c8File filter
Conversations
Jump to
There are no files selected for viewing
vstinnerJan 21, 2022
Member
Would you mind to add a quick documentation how to ignore generated files locally in git diff commands?
zwareJan 21, 2022
Member
That's the next two lines ;)
vstinnerJan 21, 2022
Member
On Discord, @erlend-aasland showed something like ``git diff :exclude:generated`, but I don't recall the command.
I understand that
git config diff.generated.binary truedoes the same thing, but without having to specify it on the command line each time.erlend-aaslandJan 21, 2022
Author
Contributor
The command I showed used a glob pattern instead of querying attributes:
zwareJan 21, 2022
Member
With this change, there is now also the option to do something like
git diff -- ":(attr:!generated)"to completely elide generated files from diff output. I'm not sure if it's worth it to document those options here, though.erlend-aaslandJan 21, 2022
Author
Contributor
Is there a git cheat sheet in the devguide? We could add some tips and tricks there.
erlend-aaslandJan 21, 2022
Author
Contributor
I created python/devguide#794