Configure Git

From Amahi Wiki
Revision as of 18:38, 28 March 2009 by Cpg (talk | contribs) (New page: Here are some settings that are nice for the ~/.gitconfig file in your home directory: <code> [user] name = Your Name Here email = your email at domain dot com [core] ...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Here are some settings that are nice for the ~/.gitconfig file in your home directory:

[user]

       name = Your Name Here
       email = your email at domain dot com

[core]

       pager = less -+$LESS -FRX

[color]

       diff = auto
       status = auto
       branch = auto
       interactive = auto

[diff]

       renames = copy

[branch]

       autosetupmerge = true

[clean]

       requireForce = true

[alias]

       ai = add -i
       di = diff -p --stat
       cdi = diff -p --stat --cached
       hdi = diff HEAD -p --stat
       ds = diff --stat
       cds = diff --cached --stat
       hds = diff HEAD --stat
       ci = commit
       co = checkout
       cpx = cherry-pick -x
       cpxs = cherry-pick -x -s
       br = branch
       ru = remote update
       st = status
       shs = show -p --stat
       sh = show -p --stat --pretty=fuller
       l = log
       #lo = log --pretty=oneline
       lo = log --pretty=format:'%Cred%h%Creset %s'
       la = log --pretty=format:'%Cred%h%Creset %Cblue%an%Creset %s'
       lad = log --pretty=format:'%Cred%h%Creset %Cgreen%ai%Creset %Cblue%an%Creset %s'
       le = log --pretty=format:'%Cred%h%Creset %Cgreen%ae%Creset %s'
       ld = log --pretty=format:'%Cred%h%Creset %Cgreen%ai%Creset %s'
       ami3 = am -i -3
       fpstd = format-patch --stdout
       wc = whatchanged -p --stat
       klo = whatchanged -p --stat
       wcy = whatchanged -p --stat --since='yesterday'
       wcw = whatchanged -p --stat --since='1 weeks ago'
       wcf = whatchanged -p --stat --pretty=fuller
       wcyf = whatchanged -p --stat --pretty=fuller --since='yesterday'
       wcwf = whatchanged -p --stat --pretty=fuller --since='1 weeks ago'
       wcs = whatchanged --stat
       wcys = whatchanged --stat --since='yesterday'
       wcws = whatchanged --stat --since='1 weeks ago'

[gc]

       auto = 0
       autopackrefs = 0
       autopacklimit = 0
       packrefs = false

[merge]

       tool = vimdiff

  • credit on these settings goes to obnox, thanks obnox!