Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion gitbootcamp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -253,14 +253,21 @@ Compare to the ``main`` branch::

git diff main

Exclude generated files from diff (note the single quotes)::
Exclude generated files from diff using an `attr <_gitattributes>`_
`pathspec <_pathspec>`_ (note the single quotes)::

git diff main ':(attr:!generated)'

Exclude generated files from diff by default::

git config diff.generated.binary true

Comment thread
erlend-aasland marked this conversation as resolved.
Resolved
The `generated` `attribute <_gitattributes>`_ is defined in `.gitattributes`,
Comment thread
erlend-aasland marked this conversation as resolved.
Resolved
found in the repository root.

.. _pathspec: https://git-scm.com/docs/gitglossary#def_pathspec
.. _gitattributes: https://git-scm.com/docs/gitattributes

.. _push-changes:

Pushing Changes
Expand Down