-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitconfig
118 lines (99 loc) · 3.61 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
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
[user]
name = Jirka Kremser
email = [email protected]
# generate key: gpg --full-generate-key
# gpg --list-secret-keys --keyid-format LONG
# will print: sec 2048R/CE0B27698D13CEA8 2017-12-04
# git config --global user.signingkey CE0B27698D13CEA8
signingkey = B2A23EA743F71369
# to print the public part of the key:
# gpg --armor --export CE0B27698D13CEA8
[alias]
branch-cleanup = "!git branch --merged | egrep -v \"(^\\*|master|dev)\" | xargs git branch -d #"
bugs = "ls-remote --heads "
# plain diff
st = "status -sb"
#colored diff
dif = diff --ignore-all-space --color --no-prefix
difw = diff --ignore-all-space --color --word-diff
# View the SHA, description, and history graph of the latest 25 commits
g = log --pretty=format:\"%h %Cblue%cr%Creset %an %Cgreen%s%Creset\" --graph --abbrev=9
l1 = log --pretty=format:\"%h %Cblue%ci%Creset %an %Cgreen%s%Creset\" --graph --abbrev=9
l = log --pretty=format:\"%h %Cblue%cr%Creset %an %Cgreen%s%Creset\" --topo-order --no-merges --abbrev=9
l4-helper = log --date=iso --pretty=format:\"%nbranch: %%REPLACE%%%nlink: https://github.com/rhq-project/rhq/commit/%h%ntime: %C(green)%cd%Creset%ncommit: %C(yellow)%H%Creset%nauthor: %C(red)%an - %ae%Creset%nmessage: %w(72,0,9)%B%Creset%n\" -4 --abbrev=9
#shows the commits made on this branch that are not present on the other branch specified as an argument
log-branch = !git log --oneline --decorate --graph --first-parent --topo-order --no-merges $1..HEAD
#abrv
a = add
cm = commit
ci = commit -s
pl = pull --rebase origin master
pll = pull --rebase
ls = for-each-ref --sort=committerdate refs/heads/ --format='%(committerdate:short) %(color:yellow)%(refname:short)%(color:reset)'
lls = 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))'
cd = checkout
sh = show
ap = add -p
rc = rebase --continue
ra = rebase --abort
unstage = reset
# commit counts
commitCount = shortlog -sn
# Undo your last commit, but don't throw away your changes
undo = reset --soft HEAD^
# fire up the merge tool
mt = mergetool
# changes between local repo and origin, use before pull/push to see the commits in advance
wtf = log --oneline --left-right HEAD...origin/master
h = !git --no-pager log origin/master..HEAD --abbrev-commit --pretty=oneline
ps = !sh -c 'git h && echo Are you sure? ENTER && read && git push origin master' -
rps = !git pl && git ps
[color]
# Use colors in Git commands that are capable of colored output when outputting to the terminal
ui = auto
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
meta = yellow bold
frag = magenta bold
old = red bold
new = green bold
[color "status"]
added = yellow
changed = green
untracked = cyan
[format]
pretty = format:time: %C(green)%ad%Creset%ncommit: %C(yellow)%H%Creset%nauthor: %C(red)%an - %ae%Creset%nmessage: %C(blue)%s%Creset%n%n
[branch]
#autosetuprebase = always
[merge]
tool = meld
[push]
default = current
[core]
excludesfile = ~/.gitignore
[help]
autocorrect = 1
[grep]
lineNumber = true
[pull]
rebase = true
[rerere]
enabled = true
autoupdate = true
[status]
showUntrackedFiles = all
[commit]
gpgsign = true
[fetch]
prune = true
[credential]
helper = osxkeychain
[url "[email protected]:"]
insteadOf = https://github.com/
[includeIf "gitdir:~/workspace/kedify/"]
path = ~/no-origin-pushes.inc
#[includeIf "hasconfig:remote.*.url:[email protected]:kedify/*"]
# path = ~/no-origin-pushes.inc