Categories
Internet Other

Git Aliases

My Git aliases.

Edit your  ~/.gitconfig

    ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate
    ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
    assume = update-index --assume-unchanged
    unassume = update-index --no-assume-unchanged
    assumed = "!git ls-files -v | grep ^h | cut -c 3-"
    amend = commit --amend -a
    st = status
    ci = commit -a -m
    co = checkout
    br = branch 
    all = add --all
    allu = add -u
    diff = diff --word-diff
    pom = push -u origin master
    update = !git fetch upstream && git merge upstream/master
    revert = git reset --soft HEAD~ 

Recommended links via Sergi GP: