~andrewzah/dotfiles

ref: 8b6e98a54f43929e924601b190c226dae204ec4e dotfiles/.gitconfig -rw-r--r-- 2.7 KiB
8b6e98a5Andrew Zah update 1 year, 8 months 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
93
94
95
[user]
  email = zah@andrewzah.com
  name = Andrew Zah
  ;signingkey = 6DA8AD68401EFD0D3F86F52477E0757829DDB540

[core]
  editor = nvim
  excludesfile = ~/.global_gitignore
	quotepath = false
	commitGraph = true

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

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

        # find all of em
        finda = "!grepalias() { git config --global --get-regexp alias | grep -i \"$1\" | awk -v nr=2 '{sub(/^alias\\./,\"\")};{printf \"\\033[31m%_10s\\033[1;37m\", $1};{sep=FS};{for (x=nr; x<=NF; x++) {printf \"%s%s\", sep, $x; }; print \"\\033[0;39m\"}'; }; grepalias"

        # 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
;[commit]
        ;gpgsign = true
[filter "lfs"]
	clean = git-lfs clean -- %f
	smudge = git-lfs smudge -- %f
	process = git-lfs filter-process
	required = true
[gc]
	writeCommitGraph = true