File tree Expand file tree Collapse file tree 1 file changed +26
-0
lines changed
Expand file tree Collapse file tree 1 file changed +26
-0
lines changed Original file line number Diff line number Diff line change @@ -240,6 +240,32 @@ Commit the files:
240240
241241 git commit -m " <message>"
242242
243+ .. _diff-changes :
244+
245+ Comparing Changes
246+ -----------------
247+
248+ View all non-commited changes::
249+
250+ git diff
251+
252+ Compare to the ``main `` branch::
253+
254+ git diff main
255+
256+ Exclude generated files from diff using an ``attr ``
257+ `pathspec <https://git-scm.com/docs/gitglossary#def_pathspec >`_ (note the
258+ single quotes)::
259+
260+ git diff main ':(attr:!generated)'
261+
262+ Exclude generated files from diff by default::
263+
264+ git config diff.generated.binary true
265+
266+ The ``generated `` `attribute <https://git-scm.com/docs/gitattributes >`_ is
267+ defined in :file: `.gitattributes `, found in the repository root.
268+
243269.. _push-changes :
244270
245271Pushing Changes
You can’t perform that action at this time.
0 commit comments