dotfiles

My personal shell configs and stuff
git clone git://git.alex.balgavy.eu/dotfiles.git
Log | Files | Refs | Submodules | README | LICENSE

gitconfig (5002B)


      1 ; vim: syntax=gitconfig
      2 [include]
      3   path = identity
      4   ; this file isn't in the repo
      5   ; sets user.name, user.email, and init.templatedir
      6 
      7 [alias]
      8     s = status
      9     wt = worktree
     10     v = "!nvim -c 'Git | only'"
     11     co = checkout
     12     cob = checkout -b
     13     f = fetch --all
     14     fapr = fetch --all --prune
     15     b = branch
     16     br = branch --remote
     17     ba = branch --all
     18     bv = branch -vv
     19 
     20     lg = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold green)(%ar)%C(reset) %C(white)%s%C(reset) %C(dim white)- %an%C(reset)%C(bold yellow)%d%C(reset)' --branches --remotes --tags --oneline --author-date-order
     21     lgv = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n''%w(130,10,10)%C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all --author-date-order
     22     lgvv = log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n''%w(130,13,13)%C(white)%s%C(reset) %C(dim white)- %an <%ce> (comm. %cn <%ce>)%C(reset)%n''%w(64,18,18)%b'  --all
     23     today = lgv --since='midnight'
     24     yesterday = lgv --since='yesterday midnight' --until='midnight'
     25     this-week = lgv --since='last-monday'
     26     past-week = lgv --since='1 weeks ago'
     27     cbsr-sprint = lgv --since='last-tuesday' --until='this-tuesday'
     28     adog = log --all --decorate --oneline --graph
     29     dog = log --decorate --oneline --graph
     30 
     31     authors = !git log --all --format='%cN <%cE>' | sort -u
     32 
     33     a = add
     34     ap = add -p
     35     af = "!git ls-files -m -o --exclude-standard | fzf --print0 -m --reverse --height=20% | xargs -0 -t -o git add"
     36     fa = af
     37     fzf = "!git ls-files -mo --exclude-standard | fzf -m --reverse --height=20%"
     38 
     39     c = commit
     40     cm = commit -m
     41     cam = commit -a -m
     42     ca = commit -a
     43     camende = commit --amend
     44     camend = commit --amend --no-edit
     45     cp = commit -p
     46 
     47     rp = reset -p
     48 
     49     ss = "!f(){ git stash push \"$@\" -- $(git diff --staged --name-only); }; f"
     50     sp = stash pop
     51     sa = stash apply
     52     sd = stash drop
     53     sl = stash list
     54 
     55     blame = "blame -w -C -C -C" # ignore whitespace, look for code movement, in multiple commits, for all commits
     56     diffs = "diff --staged"
     57     diffw = "diff --word-diff"
     58     changes = diff --summary --stat
     59     changess = changes --staged
     60     mergetest = merge --no-commit
     61     testmerge = mergetest
     62     mno = merge --no-ff
     63     mff = merge --ff-only
     64     delete-merged = "!git checkout master && git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d && git fetch --all --prune"
     65     p = push
     66     pushf = push --force-with-lease
     67     pf = pull --ff-only
     68     pff = pull --ff-only
     69     fuckit = reset --hard HEAD
     70     fuckitall = reset --hard origin/master
     71     ssh = "!git remote get-url origin | sed -E 's|^https?://([^/]+)/(.+)|git@\\1:\\2|' | tr -d '\n'"
     72     home = "!f(){ git remote get-url \"${1:-origin}\" | sed -E 's|^git@([^:]+):|https://\\1/|' | tr -d '\n'; }; f"
     73     open = "!f(){ open $(git home \"$1\"); }; f"
     74     dad = "!curl https://icanhazdadjoke.com/ && echo && git add"
     75     reignore = "!git rm -r --cached .; git add ."
     76     rebase = "rebase --committer-date-is-author-date"
     77     rc = "rebase --continue"
     78     lfs-refs = "!git fetch --all && git log -p --all -S"
     79     chp = cherry-pick
     80     chpn = cherry-pick --no-commit
     81 
     82     la = "!git config -l | grep alias | cut -c 7-"
     83     rv = remote -v
     84 
     85     subget = submodule update --init
     86     subdate = submodule update --remote
     87     substatus = submodule status
     88     subactive = "!git submodule status | grep -v '^-'"
     89     subdel = "!f(){ set -x; git submodule deinit -f "$1"; rm -rf .git/modules/"$1"; git rm -f "$1"; set +x; }; f"
     90 
     91     root = !git rev-parse --show-toplevel | tr -d '\n'
     92 
     93     edit-changed = "!$EDITOR `git status --porcelain | sed -ne 's/^ M //p'`"
     94     commit-at = "!f(){\
     95     if [ $# -eq 0 ]; then\
     96     echo \"Date format: YYYY-MM-DD HH:MM:SS\";\
     97     else\
     98     GIT_COMMITTER_DATE=\"$1\" GIT_AUTHOR_DATE=\"$1\" git commit;\
     99     fi; }; f"
    100 
    101     df = !git --git-dir=$DOTFILES/.git --work-tree=$DOTFILES
    102 
    103 [submodule]
    104     recurse = 1
    105 [merge]
    106     tool = nvimdiff
    107     conflictstyle = diff3
    108 
    109 [mergetool "nvimdiff"]
    110     cmd = nvim -d \"$LOCAL\" \"$MERGED\" \"$BASE\" \"$REMOTE\" -c \"wincmd w\" -c \"wincmd J\"
    111 [diff]
    112   algorithm = histogram
    113 [core]
    114     autocrlf = input
    115 
    116 [filter "lfs"]
    117     clean = git-lfs clean -- %f
    118     smudge = git-lfs smudge -- %f
    119     process = git-lfs filter-process
    120     required = true
    121 [init]
    122     defaultBranch = master
    123 [rerere]
    124     # remember how I solved a merge conflict and reuse it
    125     enabled = true
    126     # automatically stage the reuse
    127     autoUpdate = true
    128 # Use ssh key to sign commits
    129 [gpg]
    130     format = ssh
    131 [credential]
    132 	helper = /usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret
    133 	#helper = cache
    134 [transfer]
    135     fsckobjects = true
    136 [fetch]
    137     fsckobjects = true
    138 [receive]
    139     fsckobjects = true