Git default spalvų nustatymas konsolėje

2011-11-8 · 3 comments

in Programavimas

Jis grįžta su nauju hitu! Git turi opciją –color, kuri naudojama su kai kuriomis komandomis (pvz. git-diff). Tačiau pagal nutylėjimą ji yra išjungta t.y. norint rodyti spalvas visad reik prirašinėt –color. Įjungti galima labai paprastai – į .git/config failą įrašius šias eilutes:

[color]
    branch = auto
    diff = auto
    status = auto
[color "branch"]
    current = yellow reverse
    local = yellow 
    remote = green
[color "diff"]
    meta = yellow
    frag = magenta
    old = red 
    new = green
[color "status"]
    added = yellow
    changed = green
    untracked = cyan

Gyvenimas iškart gražesnis.

{ 3 comments… read them below or add one }

1 Remigijus Jarmalavičius 2011-11-9 at 13:02

Oho, šimtą metų negirdėtas. Naudingas dalykas. Dar daugiau tobulybių GIT’ui gali rasti čia: https://github.com/ReekenX/ubuntu-home-configs/blob/master/.gitconfig

Reply

2 Pawka 2011-11-9 at 13:43

Taip, atsibudau iš letargo miego :-)

Reply

3 Gytis Karčiauskas 2011-11-11 at 9:32

Arba tiesiog:
git config –global color.ui true ;)

Reply

Leave a Comment

You can use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Previous post:

Next post: