Software Development
Git in colour
I’ve been using Git for a while now, but only today realized I can have coloured output for diff, grep, branch, show-branch and status, without having to hook in any other external tools (like colordiff, for example).
Here’s my ~/.gitconfig file, which enables colour:
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | [user] name = Nick Boldt email = nickboldt (at) gmail.com [giggle] main-window-maximized = false main-window-geometry = 1324x838+0+24 main-window-view = HistoryView [core] trustctime = false branch = auto diff = auto interactive = auto status = auto editor = vim [merge] tool = vimdiff [receive] denyCurrentBranch = warn [branch] autosetuprebase = local [color] ui = true diff = true grep = true branch = true showbranch = true status = true [color "diff" ] plain = normal dim meta = yellow dim frag = blue bold old = magenta new = cyan whitespace = red reverse [color "status" ] header = normal dim added = yellow untracked = magenta [color "branch" ] current = yellow reverse local = yellow remote = red |
Reference: Git in colour from our JCG partner Nick Boldt at the DivByZero blog.