DEV Community

C.OG
C.OG

Posted on

5 1

Git: Exclude a folder when diffing

When doing a git diff, especially between branches, you may be greeted with a mountain of changes that you have to sift through to find what you're looking for.

Consider excluding certain folders:

git diff -- ':!<folder-name>'

You can also exclude multiple folders:

git diff -- ':!<folder-name>' ':!<other-folder>'`

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs