Skip to content

Instantly share code, notes, and snippets.

@iodic
Created March 28, 2018 09:41
Show Gist options
  • Star 7 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iodic/7daa1667140b1649ded747963a1303d9 to your computer and use it in GitHub Desktop.
Save iodic/7daa1667140b1649ded747963a1303d9 to your computer and use it in GitHub Desktop.
Exclude a directory from git diff
git diff -- . ':!directory_name'
@rajeshisnepali
Copy link

thank you.

@iodic
Copy link
Author

iodic commented Sep 13, 2019

Glad you found it useful. :)

@xzhih
Copy link

xzhih commented Apr 9, 2020

nice!

@mhenriquesa
Copy link

Thank you!

@silvenon
Copy link

silvenon commented May 1, 2021

Oh wow, this works, thanks!

@aryankarim
Copy link

appreciation and gratitude!

@3l3n01
Copy link

3l3n01 commented Jan 14, 2023

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment