-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitconfig
More file actions
120 lines (92 loc) · 2.9 KB
/
.gitconfig
File metadata and controls
120 lines (92 loc) · 2.9 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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# vim: ft=gitconfig
[user]
name = Taras Kalapun
email = t.kalapun@gmail.com
# signingkey = E3B84873DFD4AA69
[github]
user = xslim
[core]
editor = vim
excludesfile = ~/.gitignore
whitespace = trailing-space,space-before-tab
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eol
[apply]
whitespace = fix
[color]
ui = auto
diff = auto
status = auto
branch = auto
interactive = auto
[merge]
tool = vimdiff
conflictstyle = diff3
prompt = false
keepBackup = false
[push]
default = simple
followTags = true
[pull]
rebase = true
[commit]
# https://help.github.com/articles/signing-commits-using-gpg/
#gpgsign = true
[branch]
autosetupmerge = always
autosetuprebase = local
[branch "master"]
rebase = true
remote = origin
merge = refs/heads/master
[filter "media"]
clean = git-media-clean %f
smudge = git-media-smudge %f
[filter "lfs"]
clean = git-lfs clean %f
smudge = git-lfs smudge %f
required = true
[gpg]
program = gpg
[alias]
tags = tag -l
branches = branch -a
remotes = remote -v
co = checkout
st = status -s
br = branch
cl1 = clone --depth 1 --recurse-submodules
rbc = rebase --continue
sub = submodule
sup = submodule update --init
l = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat
lnc = log --pretty=format:"%h\\ %s\\ [%cn]"
lds = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short
com = commit -m
coma = commit -am
coa = "!git add -A && git commit -m"
# Show modified files in last commit
dl = "!git ll -1"
# Show a diff last commit
dlc = diff --cached HEAD^
dlcw = diff --cached HEAD^ --color-words --word-diff
diffw = diff --color-words --word-diff
hist = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short
# Find a file path in codebase
f = "!git ls-files | grep -i"
# Search/grep your entire codebase for a string
grep = grep -Ii
gr = grep -Ii
# Grep from root folder
gra = "!f() { A=$(pwd) && TOPLEVEL=$(git rev-parse --show-toplevel) && cd $TOPLEVEL && git grep --full-name -In $1 | xargs -I{} echo $TOPLEVEL/{} && cd $A; }; f"
# Show the last tag
lasttag = describe --tags --abbrev=0
lt = describe --tags --abbrev=0
# List all your Aliases
la = "!git config -l | grep alias | cut -c 7- | sed -e 's/=/^[[0;31m=^[[0m/g' | sed -e 's/#.*/^[[0;32m&^[[0m/g'"
#la = "!grep '\t=' ~/.gitconfig | sed -e 's/=/^[[0;31m=^[[0m/g' | sed -e 's/#.*/^[[0;32m&^[[0m/g' | less -R"
# git mgd branch-name to merge and delete a branch in one go
mgd = "!git merge $1 && git branch -d $1; #"
# Unpushed stuff
unpushed = "log --branches --not --remotes"