forked from xenithorb/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
49 lines (49 loc) · 2.57 KB
/
.gitconfig
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
[user]
#email = xenithorb@users.noreply.github.com
name = "Michael Goodwin"
useConfigOnly = true
[init]
templatedir = ~/.git-templ
[push]
default = simple
[gui]
fontui = -family \"DejaVu Sans\" -size 9 -weight normal -slant roman -underline 0 -overstrike 0
fontdiff = -family \"DejaVu Sans Mono\" -size 9 -weight normal -slant roman -underline 0 -overstrike 0
historybrowser = git-dag
editor = "bash -c '_v(){ p=\"$(readlink -e \"$0\")\"; konsole -e vim -- -fp \"$p\"; }; _v $@'"
[diff]
tool = "bash -c '_v(){ p=\"$(readlink -e \"$0\")\"; konsole -e vimdiff -- -f \"$p\"; }; _v $@'"
[merge]
tool = "bash -c '_v(){ p=\"$(readlink -e \"$0\")\"; konsole -e vimdiff -- -f \"$p\"; }; _v $@'"
[difftool]
prompt = true
[apply]
whitespace = fix
[alias]
co = checkout
ci = commit
st = status
br = branch
gg = log --oneline --decorate --graph
gga = log --oneline --decorate --graph --all
ls = !git ls-tree $(git rev-parse HEAD) -trl --abbrev=7
;; nb or 'nuke branch' to get rid of it completely
nb = "!__nb(){ git branch -D \"$1\" && git push -u origin :\"$1\"; }; __nb"
;; Resets the git committer date to the git author date - useful when github commit dates are out of whack
reset-date = filter-branch --env-filter 'export GIT_COMMITTER_DATE="$GIT_AUTHOR_DATE"'
;; Quickly re-write commits with a new email
re-email = "!set -x;_reEmail(){ git filter-branch --env-filter 'if [[ '\\$GIT_AUTHOR_EMAIL' == '"$1"' ]]; then export GIT_AUTHOR_EMAIL='"$2"' GIT_COMMITTER_EMAIL='"$2"' GIT_COMMITTER_DATE='\\$GIT_AUTHOR_DATE'; fi' HEAD; }; _reEmail"
;; Recursively show all status and branch -v for all git repos
walk = "!find -type d -name \"*.git\" | while read -r line; do d=\"${line%/.git}\"; pushd \"$d\" &>/dev/null; echo -e \"\\n\\033[35m##### ${d^^} #####\\033[0m\\n\"; git -c color.status=always status -sbu; echo; git branch --color=always -vv; popd &>/dev/null; done | less -R"
; Fetch a pull request, format: git fpr <remote> <pr_#>
fpr = "!__fpr(){ git fetch \"$1\" pull/\"$2\"/head:\"$3\"; }; __fpr"
;; Prints (recursively) the folders that are NOT git repos
notrepo = "!find . -mindepth 1 -maxdepth 1 -type d | while read -r line; do [[ ! -d \"${line}/.git\" ]] && echo \"$line\"; done"
;; Prints (recursively) the folders that are git repos, but have no remote origin
deadrepo = "!find . -mindepth 1 -maxdepth 2 -name \".git\" -type d | while read -r line; do dir=\"${line%%/.git}\"; pushd \"$dir\" >/dev/null; git ls-remote 2>&1 >/dev/null | grep -q ERROR && echo \"$dir\"; popd >/dev/null; done"
[cola]
tabwidth = 2
fontdiff = Monospace,9,-1,5,50,0,0,0,0,0
linebreak = false
[commit]
verbose = 1