Skip to content

Instantly share code, notes, and snippets.

@dm7
Forked from arya-oss/gitconfig
Created November 6, 2019 17:35
Show Gist options
  • Save dm7/760ee9a5d46a710c6646db8cc9a3e852 to your computer and use it in GitHub Desktop.
Save dm7/760ee9a5d46a710c6646db8cc9a3e852 to your computer and use it in GitHub Desktop.

Revisions

  1. @arya-oss arya-oss created this gist Dec 26, 2017.
    32 changes: 32 additions & 0 deletions gitconfig
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,32 @@
    [user]
    name = rajmani1995
    email = [email protected]
    [credential]
    helper = cache --timeout=3600
    [alias]
    aliases = config --get-regexp '^alias\\.'
    br = branch
    branch-name = rev-parse --abbrev-ref HEAD
    ci = commit -m
    cm = !git add -A && git commit -m
    co = checkout
    cob = checkout -b
    cl = clone
    cld = clone --depth=1
    dsf = "!f() { [ -z \"$GIT_PREFIX\" ] || cd \"$GIT_PREFIX\" && git diff --color \"$@\" | diff-so-fancy | less --tabs=4 -RFX; }; f"
    l = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
    lo = log --oneline
    work = log --pretty=format:'%C(auto,yellow)%h %C(auto,blue)%>(12,trunc)%ar %C(auto,green)%<(12,trunc)%aN%C(auto,reset)%s%C(auto,red)% gD% D'
    poop = stash pop
    pr = "!git push -u origin $(git branch-name)"
    s = status
    st = status -sb
    save = !git add -A && git commit -m "SAVEPOINT"
    tagcommit = rev-list -n 1
    undo = reset HEAD~1 --mixed
    unpub = "!git push origin :$(git branch-name)"
    unstage = reset HEAD
    wip = !git add -u && git commit -m "WIP"
    wipe = !git add -A && git commit -qm "WIPE SAVEPOINT" && git reset HEAD~1 --hard
    [core]
    autocrlf = input