blob: 6ad8097d9127b7873212cb67ed2fdc30ebec8f9b (
plain) (
blame)
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
|
[user]
name = Egor Tensin
email = Egor.Tensin@gmail.com
[core]
editor = vim
autocrlf = false
[push]
default = current
[mergetool]
keepBackup = false
[pull]
ff = only
[alias]
clean-all = clean -fdx
clean-ignored = clean -fdX
clean-unknown = clean -fd
l = log --oneline
# This is awesome: http://stackoverflow.com/a/1838938/514684
ll = log --graph --full-history --all --pretty=format:"%h%x09%d%x20%s"
lll = log --graph --full-history --all --color --pretty=tformat:"%x1b[31m%h%x09%x1b[32m%d%x1b[0m%x20%s%x20%x1b[33m(%an)%x1b[0m"
# I think this is only usable on Cygwin, given all the file permission
# madness there:
xx = update-index --add --chmod=+x
hide = update-index --skip-worktree
unhide = update-index --no-skip-worktree
hidden = !git ls-files -v | grep --basic-regexp \"^\\([[:lower:]]\\|S\\)\"
# I heard git might use sh for aliases, so I tried to keep that in
# mind. Didn't want to bother with an external script.
fixup = "! \
__git_fixup() { \
if ! git rev-parse --is-inside-work-tree >/dev/null 2>&1 ; then \
echo 'Not inside a Git repository.' >&2 ; \
return 1 ; \
fi ; \
\
if ! git rev-parse HEAD >/dev/null 2>&1 ; then \
echo \"Where's your HEAD?\" >&2 ; \
return 1 ; \
fi ; \
\
has_staged_changes= ; \
git diff --cached --ignore-submodules --quiet || has_staged_changes=1 ; \
\
has_unstaged_changes= ; \
git diff --ignore-submodules --quiet || has_unstaged_changes=1 ; \
\
if [ -z \"${has_staged_changes}\" ] && [ -z \"${has_unstaged_changes}\" ]; then \
echo 'No staged or unstaged changes, seemingly?' >&2 ; \
return 1 ; \
fi ; \
\
add=-a ; \
[ -n \"$has_staged_changes\" ] && add= ; \
\
numof_parents=`git rev-list --parents -n 1 HEAD | wc --words` ; \
if [ \"$numof_parents\" -eq 1 ] ; then \
dest_ref=--root ; \
elif [ \"$numof_parents\" -eq 2 ] ; then \
dest_ref=HEAD^^ ; \
else \
echo 'Sure you want to fixup a merge commit?' >&2 ; \
return 1 ; \
fi ; \
\
git commit $add --fixup=HEAD || return $? ; \
\
stash= ; \
[ -n \"$has_staged_changes\" ] && [ -n \"$has_unstaged_changes\" ] && stash=1 ; \
\
if [ -n \"$stash\" ]; then \
git stash push --quiet || return $? ; \
fi ; \
\
GIT_EDITOR=true git rebase -i --autosquash \"$dest_ref\" || return $? ; \
\
if [ -n \"$stash\" ]; then \
git stash pop --quiet || return $? ; \
fi ; \
} ; \
__git_fixup ; \
"
[fetch]
prune = true
[log]
follow = true
[include]
path = ~/.gitconfig_work
[filter "lfs"]
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
clean = git-lfs clean -- %f
|