-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy path.gitconfig
More file actions
130 lines (110 loc) · 3.34 KB
/
.gitconfig
File metadata and controls
130 lines (110 loc) · 3.34 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
121
122
123
124
125
126
127
128
129
130
[user]
name = Sergii Golovatiuk
email = sgolovat@redhat.com
[github]
user = holser
[credential]
helper = cache --timeout=3600
[color]
ui = true
diff = true
grep = true
status = true
[color "branch"]
current = red
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = yellow
[color "status"]
added = yellow
changed = green
untracked = cyan
[core]
excludesfile = ~/.gitignore_global
editor = vim
pager = less -R
autocrlf = input
safecrlf = true
whitespace = fix, -intent-with-non-tab, space-before-tab, trailing-space, cr-at-eol
[i18n]
filesEncoding = utf-8
[diff]
renames = copy
tool = vimdiff
[difftool "sourcetree"]
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
path =
[merge]
tool = vimdiff
conflictstyle = diff3
[mergetool]
keepBackup = true
prompt = false
[mergetool "sourcetree"]
cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
trustExitCode = true
[filter "media"]
clean = git-media-clean %f
smudge = git-media-smudge %f
[log]
decorate = full
[push]
default = matching
[gitreview]
username = holser
username = holser
[alias]
# Base commands
ci = commit
br = branch
co = checkout
df = diff
ia = commit --allow-empty-message -a
# Stash commands
sl = stash list
sa = stash apply
ss = stash save
# Show history
history = log --pretty=format:\"%h %ad | %s%d [%an]\" --graph --date=short
changes = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%ci) %C(bold blue)<%an>%Creset' --date-order
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
# Show all prfiles
ls = !git rev-parse --abbrev-ref HEAD | xargs git ls-tree -r --full-tree --full-name --name-only
# Push into current remote branch
pc = !git rev-parse --abbrev-ref HEAD | xargs git push origin
# Show untracked files
stu = status --untracked-files=no
# Show git commands
commitmmands = help -a
# Get object type
type = cat-file -t
# Gett file info
info = cat-file -p
# Show commit logs
logs = Show !git shortlog --summary | sort --reverse --numeric-sort
# Show conflicts
conflicts = !git ls-files --unmerged | cut -f2 | sort -u | xargs grep -El '<<<<<<<|=======|>>>>>>>'
# Show unmergd files
unmerged = files !git ls-files --unmerged | cut -f2 | sort -u
# Uncommit
uncomit = !git reset --soft $(git log --format=%H -2 | tail -1)
# Show aliases
aliases = !git config -l | grep alias | cut -c 7-
# Find files
find = !git ls-files -r HEAD | grep -ii
# Remove files which have been diffeleted
remove = !git ls-files -z --deleted | xargs -0 git rm
# Ignore a file
ignore = !([ ! -e .gitignore ] && touch .gitignore) |gitignore echo $1 >> .gitignore
# Assume a file as unchanged
assume = !gitt update-index --assume-unchanged
# Unassume a file
unassume = !gitignoret update-index --no-assume-unchanged
# Show assumed files
assumed = !git ls-files -v | grep ^h | cut -c 3-
# Pull from remote repository
fork = !git config --get remote.origin.url | xargs git pull