Skip to content

Instantly share code, notes, and snippets.

@vladimir-light
Created June 15, 2020 16:13
Show Gist options
  • Select an option

  • Save vladimir-light/9401d8484a995dc37b3ab87de3902ad4 to your computer and use it in GitHub Desktop.

Select an option

Save vladimir-light/9401d8484a995dc37b3ab87de3902ad4 to your computer and use it in GitHub Desktop.

Revisions

  1. vladimir-light created this gist Jun 15, 2020.
    26 changes: 26 additions & 0 deletions gitconfig
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,26 @@
    [core]
    autocrlf = input
    whitespace = cr-at-eol
    [alias]
    alias = ! git config --get-regexp ^alias\\. | sed -e s/^alias\\.// -e s/\\ /\\ =\\ /
    co = checkout
    ci = commit
    st = status
    br = branch
    bra = for-each-ref --sort=committerdate refs/heads/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))'
    type = cat-file -t
    dump = cat-file -p
    ls = log --no-abbrev-commit --pretty=format:' * %C(yellow)%h%Creset %Cred%ad%Creset – %C(cyan)[%aN]%Creset – %s %Cgreen%d %Creset' --date=short #History in hübsch
    logg = log --oneline --no-abbrev-commit --graph --decorate
    cbr = symbolic-ref --short HEAD #aktuelle Branch
    lastcommit = rev-parse HEAD
    unpushed = log --graph --decorate --pretty=oneline --abbrev-commit @{u}..HEAD
    stash-list = stash list --pretty=format:'%C(red)%h%C(reset) - %C(dim yellow)(%C(bold magenta)%gd%C(dim yellow))%C(reset) %<(70,trunc)%s %C(green)(%cr) %C(bold blue)<%an>%C(reset)'
    local-branches = !git branch -vv | cut -c 3- | awk '$3 !~/\\[origin/ { print $1 }'

    [pull]
    rebase = true
    [push]
    default = tracking
    [rebase]
    autosquash = true