You are now browsing Linux category.
February 14th, 2009 01:39 |
Category: Linux
Create your .gitconfig file in your home directory.
vim ~/.gitconfig
Copy and paste the following lines to ~/.gitconfig file.
[color]
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
[color "status"]
added = yellow
changed = green
untracked = cyan
Now, run some git commands to see some colorful output:
git status
git branch
git log -p
Bonus: Lets add some aliases to .gitconfig.
[alias]
st = status
df = diff
lg = log -p
Wanna learn more about git ? Lets cheat!
$ sudo gem install cheat
$ cheat git