~andrewzah/dotfiles

ref: openbsd-x220 dotfiles/.gitconfig -rw-r--r-- 2.2 KiB
86dfc884Andrew Zah update 2 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
[user]
  email = zah@andrewzah.com
  name = Andrew Zah

[core]
  editor = nvim
  excludesfile = ~/.global_gitignore

[alias]
  aliases = !git config --list | grep 'alias\\.' | sed 's/alias\\.\\([^=]*\\)=\\(.*\\)/\\1\\ \t => \\2/' | sort

    # git add --all
    aa = add --all

    # delete branch
    brdel = branch -D

    # most modified files
    churn = !git log --all -M -C --name-only --format='format:' "$@" | sort | grep -v '^$' | uniq -c | sort | awk 'BEGIN {print "count,file"} {print $1 "," $2}'

    # save repo as tarball
    export = archive -o latest.tar.gz -9 --prefix=latest/

    # list of commit sha-1s
    l = "!f() { git log $* | grep '^commit ' | cut -f 2 -d ' '; }; f"

    # list all tags
    tags = tag -l

    # checks that local refs are up to date before overwriting
    please = push --force-with-lease

    # see recent branches worked on
    recent = for-each-ref --count=10 --sort=-committerdate refs/heads/ --format="%(refname:short)"

    # see overview of commits
    overview = log --all --oneline --no-merges

    # recap your own commits on a project
    recap = log --all --pretty=format:'%h %ad %s' --no-merges --author=<zah@andrewzah.com> --date=short

    # amend commit
    commend = commit --amend --no-edit

    # merge no fast forward
    merc = merge --no-ff

    # brief status
    st = status --short --branch

    # stash only unstaged changes to tracked files
    stsh = stash --keep-index

    # stash any changes to tracked files
    staash = stash --include-untracked

    # stash ignored, untracked, and tracked files
    staaash = stash --all

    # initialize empty repo and commit
    it = !git init && git commit -m \"root\" --allow-empty }
[diff]
    indentHeuristic = on
[log]
  date = relative
[color]
    ui = true
[color "branch"]
    current = yellow reverse
    local = yellow
    remote = green
[color "diff"]
    meta = yellow
    frag = magenta
    old = red
    new = green
[color "status"]
    added = yellow
    changed = green
    untracked = red

# shorthand URLs
[url "https://github.com/"]
    insteadOf = gh:
[url "git@github.com:"]
    insteadOf = ghs:
[url "https://gist.github.com/"]
    insteadOf = gist:
[url "https://gitlab.com/"]
    insteadOf = gl:
[url "git@gitlab.com:"]
    insteadOf = gls: