-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy pathgitconfig.template
More file actions
96 lines (96 loc) · 3.56 KB
/
gitconfig.template
File metadata and controls
96 lines (96 loc) · 3.56 KB
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
96
# This is Git's per-user configuration file.
# It must be edited for your developer environment
#
# For full extended diff support, the following
# commands must be in your PATH:
# - pandoc
# - pdfinfo
# - hexdump
# - odt2txt
# - unzip
# - zcat
# - bzcat
# - xzcat
# - tar
# - exif
#
# To install this template, run:
#
# `cp gitconfig.template ~/.gitconfig`
# `cp gitattributes.template ~/.gitattributes`
#
[user]
name = John Q. Dow
email = jqd@example.com
[credential]
helper = cache --timeout 120
[http]
sslBackend = openssl
# sslCAinfo = /bin/ca-certificates.crt
# sslVerify = false
[push]
default = simple
[core]
attributesFile = ~/.gitattributes
[alias]
wdiff = diff --word-diff=color --unified=1
amend = "!f(){ git add . && git commit --amend ${1}; };f"
r10 = rebase -i HEAD~10
rm-add = add -u
hard-reset = !git reset HEAD --hard && git clean -fd
ls = log --oneline
ls-ignored = clean -ndX
ca = commit --all
push-om = push origin master
pull-om = pull origin master
no-ssl-check = !"f() { if [ -z "$1" ]; then echo "usage: git no-ssl-check [command]"; exit 1; fi; GIT_SSL_NO_VERIFY="true" git $*; }; f"
debug = "!set -x; GIT_TRACE=2 GIT_CURL_VERBOSE=2 GIT_TRACE_PERFORMANCE=2 GIT_TRACE_PACK_ACCESS=2 GIT_TRACE_PACKET=2 GIT_TRACE_PACKFILE=2 GIT_TRACE_SETUP=2 GIT_TRACE_SHALLOW=2 git"
lg = log --graph --abbrev-commit --decorate --date=relative --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)' --all
lsb = "!git for-each-ref --sort='-authordate' --format='%(authordate)%09%(objectname:short)%09%(refname)' refs/heads | sed -e 's-refs/heads/--'"
unstage = reset HEAD --
last = log -1 HEAD
undo = reset --soft HEAD~1
contrib = shortlog -s -n
archive = !"f() { top=$(rev-parse --show-toplevel); cd $top; tar cvf $top.tar $top ; }; f"
churn = !git log --all --find-copies --find-renames --name-only --format='format:' "$@" | sort | grep -v '^$' | uniq -c | sort | awk 'BEGIN {print "count\tfile"} {print $1 "\t" $2}' | sort -g
get-patch = format-patch --stdout -1
lgb = !git for-each-ref --sort=committerdate refs/heads/ --format='%(HEAD) %(color:yellow)%(refname:short)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))'
set-fdate = !"f() { IFS=$'\n'; for FILE in $(git ls-files); do TIME=$(git log --pretty=format:%cd -n 1 --date=iso -- "$FILE"); TIME=$(date -d "$TIME" +%Y%m%d%H%M.%S); touch -m -t "$TIME" "$FILE"; done; }; f"
[diff "zip"]
textconv = unzip -p
binary = true
[diff "gz"]
textconv = zcat
binary = true
[diff "bz2"]
textconv = bzcat
binary = true
[diff "xz"]
textconv = xzcat
binary = true
[diff "tar"]
textconv = tar -O -xf
binary = true
[diff "tar-bz2"]
textconv = tar -O -xjf
binary = true
[diff "tar-gz"]
textconv = tar -O -xzf
binary = true
[diff "tar-xz"]
textconv = tar -O -xJf
binary = true
[diff "odf"]
textconv = odt2txt
[diff "pdf"]
textconv = pdfinfo
[diff "bin"]
textconv = hexdump -v -C
[diff "o_binary"]
textconv = hexdump -v -C
[diff "pandoc"]
textconv=pandoc --to=markdown
prompt = false
[diff "exif"]
textconv = exif
cachetextconv = true