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)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay