Template for .gitconfig

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

[user]
    email = my mail address
    name = Roland Kluge
[core]
    editor = vim
    excludesfile = ~/.gitexcludes
[branch "master"]
    mergeoptions = --no-ff
[alias]
        l = log --graph --pretty=oneline --abbrev-commit --decorate
        lt = log --topo-order --graph --pretty=oneline --abbrev-commit --decorate
[color]
        # 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
[push]
        # 'git push' should only do the current branch, not all
        default = current
[branch]
        # always setup 'git pull' to rebase instead of merge
        autosetuprebase = always
[alias]
        st = status
        ci = commit
        br = branch
        co = checkout
        df = diff

Leave a Reply