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:

[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.

Related Whitepaper:

Software Architecture

This guide will introduce you to the world of Software Architecture!

This 162 page guide will cover topics within the field of software architecture including: software architecture as a solution balancing the concerns of different stakeholders, quality assurance, methods to describe and evaluate architectures, the influence of architecture on reuse, and the life cycle of a system and its architecture. This guide concludes with a comparison between the professions of software architect and software engineer.

Get it Now!  

Leave a Reply


nine + 2 =



Java Code Geeks and all content copyright © 2010-2014, Exelixis Media Ltd | Terms of Use
All trademarks and registered trademarks appearing on Java Code Geeks are the property of their respective owners.
Java is a trademark or registered trademark of Oracle Corporation in the United States and other countries.
Java Code Geeks is not connected to Oracle Corporation and is not sponsored by Oracle Corporation.

Sign up for our Newsletter

15,153 insiders are already enjoying weekly updates and complimentary whitepapers! Join them now to gain exclusive access to the latest news in the Java world, as well as insights about Android, Scala, Groovy and other related technologies.

As an extra bonus, by joining you will get our brand new e-books, published by Java Code Geeks and their JCG partners for your reading pleasure! Enter your info and stay on top of things,

  • Fresh trends
  • Cases and examples
  • Research and insights
  • Two complimentary e-books