In linux git doesn’t show colors by default. To make git diff, log, status, etc…, show pretty colors you need to issue this command from a terminal:

git config --global color.ui true
[ git  linux  programming  ]
Building a simple server with C++
Mutexes in C++
File descriptors
Introduction to C++ threads