Git lazy with more aliases

Amending ~/.gitconfig file.

[alias]

        # one-line log 1
        mylog = log --pretty=format:'%C(yellow)%h %Cblue%>(12)%ad %Cgreen%<(7)%$

        # one-line log 2
        l = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ $

        g = git
        a = add
        ap = add -p
        c = commit --verbose
        ca = commit -a --verbose
        cm = commit -m
        cam = commit -a -m
        m = commit --amend --verbose

        d = diff
        ds = diff --stat
        dc = diff --cached

        s = status -s
        co = checkout
        cob = checkout -b
        # list branches sorted by last modified
        b = "!git for-each-ref --sort='-authordate' --format='%(authordate)%09%$

        # list aliases
        la = "!git config -l | grep alias | cut -c 7-"

Some more reading.

Show Comments