diff --git a/.gitattributes b/.gitattributes
index 3ca6164b381e1acd3590c77ad59ac7cb6fa07e1d..e884ab8909f2d495a399b72f7304038f933c8379 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,2 +1,10 @@
 *.snap binary
 *.xlog binary
+*.c diff=cpp
+*.h diff=cpp
+*.cc diff=cpp
+*.hh diff=cpp
+*.cpp diff=cpp
+*.hpp diff=cpp
+*.c++ diff=cpp
+*.h++ diff=cpp