Template for .gitconfig

The following is a suggested setup of the Git configuration file (_~/.gitconfig):

    email = my mail address
    name = Roland Kluge
    editor = vim
    excludesfile = ~/.gitexcludes
[branch "master"]
    mergeoptions = --no-ff
        l = log --graph --pretty=oneline --abbrev-commit --decorate
        lt = log --topo-order --graph --pretty=oneline --abbrev-commit --decorate
        # turn on color
        diff = auto
        status = auto
        branch = auto
        interactive = auto
        ui = auto
[color "branch"]
        current = green bold
        local = green
        remote = red bold
[color "diff"]
        meta = yellow bold
        frag = magenta bold
        old = red bold
        new = green bold
[color "status"]
        added = green bold
        changed = yellow bold
        untracked = red
        # 'git push' should only do the current branch, not all
        default = current
        # always setup 'git pull' to rebase instead of merge
        autosetuprebase = always
        st = status
        ci = commit
        br = branch
        co = checkout
        df = diff

Leave a Reply