Skip to content

Instantly share code, notes, and snippets.

@obrunofontana
Last active February 8, 2022 23:32
Show Gist options
  • Save obrunofontana/1d2d2036913262917c742eb06775146c to your computer and use it in GitHub Desktop.
Save obrunofontana/1d2d2036913262917c742eb06775146c to your computer and use it in GitHub Desktop.

Revisions

  1. obrunofontana revised this gist Feb 8, 2022. 1 changed file with 14 additions and 1 deletion.
    15 changes: 14 additions & 1 deletion .gitconfig
    Original file line number Diff line number Diff line change
    @@ -38,7 +38,12 @@
    #############
    f = fetch
    #############
    l = !git log --pretty=format:'%C(blue)%h %C(red)%d %C(white)%s - %C(cyan)%cn, %C(green)%cr'
    l = !git log --pretty=format:'%C(blue)%h %C(red)%d %C(reset)%s - %C(cyan)%cn, %C(green)%cr'
    # Lista dos ultimos commits com arquivos modificados
    ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
    # Mostra lista de commits como uma árvore
    ltree = log --graph --abbrev-commit --decorate --all --format=format:'%C(bold blue)%h%C(reset) - %C(cyan)%aD%C(reset) - %an %C(blue)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n %C(green)%s%C(reset)'
    # Lista dos ultimos commits, com decoração e cores
    #############
    m = merge
    #############
    @@ -54,6 +59,14 @@
    pl = pull
    #############
    s = status -s -b

    # Desfaz o ultimo commit
    oops = reset --soft HEAD^

    # Lista os 10 topcommitters
    top10 = "!_() { \
    git shortlog -sn --no-merges | head -n${1:-10}; \
    }; _"
    [pull]
    rebase = false
    [core]
  2. obrunofontana created this gist Feb 8, 2022.
    60 changes: 60 additions & 0 deletions .gitconfig
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,60 @@
    [user]
    name = obrunofontana
    email = [email protected]
    [credential]
    helper = cache
    [color]
    ui = auto
    [color "branch"]
    current = yellow bold
    local = green bold
    remote = cyan bold
    [color "diff"]
    meta = yellow bold
    frag = magenta bold
    old = red bold
    new = green bold
    whitespace = red reverse
    [color "status"]
    added = green bold
    changed = yellow bold
    untracked = red bold
    [diff]
    tool = vimdiff
    [difftool]
    prompt = false
    [github]
    user = pksunkara
    token = token
    [gitflow "prefix"]
    versiontag = v
    [sequence]
    editor = interactive-rebase-tool
    [alias]
    c = !git add --all && git commit -m
    cl = clone
    #############
    d = diff
    #############
    f = fetch
    #############
    l = !git log --pretty=format:'%C(blue)%h %C(red)%d %C(white)%s - %C(cyan)%cn, %C(green)%cr'
    #############
    m = merge
    #############
    co = checkout
    cb = checkout -b
    #############
    ps = push
    #############
    pso = push origin
    #############
    psom = push origin master
    #############
    pl = pull
    #############
    s = status -s -b
    [pull]
    rebase = false
    [core]
    editor = code --wait