-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitconfig
More file actions
90 lines (89 loc) · 3.43 KB
/
.gitconfig
File metadata and controls
90 lines (89 loc) · 3.43 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
[user]
name = Admir Trakic
[core]
editor = vim
whitespace = fix,-indent-with-non-tab,trailing-space,cr-at-eo
autocrlf = input
excludesfile = ~/.gitignore
sshCommand = ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no
[alias]
sha = rev-parse HEAD
last = log -1 HEAD
st = status
ci = commit
br = branch
co = checkout
tree = log --graph --decorate --pretty=oneline --abbrev-commit --all
graph = log --graph --all --decorate --stat --date=iso
logc = log --color --graph --pretty=format:'%Cred%h%Creset-%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'
logc-all = !git logc --all
log-pretty = !git log --pretty=oneline
log-last = !git log -1 HEAD
log-stat = !git log --stat
sync = !git fetch -p && git rebase && git push -u
brall = !git branch -a
sort-author = !git for-each-ref --format='%(committerdate) %09 %(authorname) %09 %(refname)' | sort -k5n -k2M -k3n -k4n
stash-all = stash --include-untracked
deleted = log --diff-filter=D --summary
amend = commit --amend
whatis = show -s --pretty='tformat:%h (%s, %ad)' --date=short
stash-unapply = !git stash show -p | git apply -R
since = !git rev-list ..master HEAD
since-branching = !git rev-list ...master HEAD
two-weeks-ago = !git whatchanged --since='2 weeks ago'
curr-tag = !git rev-parse --abbrev-ref HEAD
curr-hash = !git rev-parse HEAD | cut -c1-6
co-yesterday-master = !git checkout master@{yesterday}
merged = !git branch -a --merged # list merged branches
rebase-master = !git pull --rebase upstream master # Rebase your changes on top of the remote master
pl = pull —rebase
# [apt-get install -y git-extras]
root = !git git-root
up = "!git remote update -p; git merge --ff-only @{u}" # https://stackoverflow.com/questions/6406762/why-am-i-merging-remote-tracking-branch-origin-develop-into-develop
undo = "!f() { git reset --hard $(git rev-parse --abbrev-ref HEAD)@{${1-1}}; }; f"
all = "!f() { ls | xargs -I{} git -C {} $1; }; f"
cob = "!f() { git checkout -b $1 --set-upstream; }; f" # 1 - branch-name
squash-multiple = "!f() { git rebase -i $i; } f"
cdroot = "!f() { cd $(git rev-parse --show-toplevel); }; f"
cherry-pick = "!f() { git rebase $1^ ; }; f" # 1 - commitid
# LeaderBoards:
rank = shortlog -sn --all --no-merges
stats = git shortlog -sn --since='10 weeks' --until='2 weeks'
word-diff = !git diff --word-diff
recent = !git for-each-ref --count=10 --sort=-committerdate refs/heads/ --format="%(refname:short)"
everyone = !git log --all --oneline --no-merges # see what everyones been getting up to
overview = !git log --all --since='2 weeks' --oneline --no-merges
# [Funny stuff]:
git-tip = !docker run -it --rm djoudix/git-tip git-tip
undo-howto = !curl -s ohshitgit.com | lynx --stdin
[pull]
rebase = true
[push]
default = current
[diff]
#external = /usr/bin/vimdiff
renames = copies
mnemonicprefix = true
[branch]
autosetupmerge = true
autosetuprebase = remote
[merge]
stat = true
tool = xxdiff
[color]
ui = auto
[rerere]
enabled = true
[advice]
statusHints = true
pushNonFastForward = false
[credential]
helper = !aws codecommit credential-helper $@
UseHttpPath = true
[status]
submoduleSummary = true
[fetch]
prune = true