-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitconfig
102 lines (81 loc) · 2.64 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
[alias]
datetime = !date +'%Y-%m-%d %H:%M:%S' && :
s = status -sb
st = status
addi = add --patch
unstage = reset HEAD --
ls = ls-files
ds = diff --staged
staged = diff --staged
du = diff
unstaged = diff
dsw = diff --staged -w
duw = diff -w
wds = diff --staged --color-words
wstaged = diff --staged --color-words
wdu = diff --color-words
wunstaged = diff --color-words
ci = commit
cm = commit
amend = commit --amend
pick = cherry-pick
graph = log --graph --all
hist = log --first-parent
last = log -1 --stat
contributors = shortlog -s -n --no-merges
search = branch -a --contains
rso = remote show origin
co = checkout
br = branch
br-current = rev-parse --abbrev-ref HEAD
# Archiving branch (create tag archive/BRANCH and destroy BRANCH).
# Call like `git br-arch BRANCH`.
# This alias makes the following steps:
# * fetch and clear all branches/tags
# * ensure that branch exists
# * create new tag based on origin branch
# * push created tag
# * destroy archivized remote branch
# * prune destroyed branch
br-arch = ! \
git fetch origin --prune --tags && \
git rev-parse --verify origin/$1 && \
git tag archive/$1 origin/$1 -m \"`git datetime`\" && \
git push origin archive/$1 && \
git push origin :$1 && \
git remote prune origin && :
puff = pull --ff
poc = !git push origin `git br-current`
puc = !git push upstream `git br-current`
boom = !git poc --force-with-lease && :
kaboom = !git add -A . && git amend --no-edit --allow-empty && git boom && :
# prune remote branches/tags from all remotes, fetch branches/tags and override local tags with corresponding versions on remote
update = fetch --all --prune --tags
tags = tag -n
type = cat-file -t
dump = cat-file -p
clear = ! \
git update && \
git gc && :
[branch "master"]
mergeoptions = --no-ff --no-commit
[color]
branch = auto
diff = auto
interactive = auto
status = auto
ui = auto
[core]
autocrlf = false
pager = less -FRSX
quotepath = false
safecrlf = true
ignoreCase = false
[format]
pretty = format:'%C(green)%h%Creset %C(cyan)%ad%x08%x08%x08%x08%x08%x08%Creset -%C(yellow)%d%Creset %s %C(green)[%Creset%C(cyan)%an%Creset%C(green)]%Creset'
[grep]
linenumber = true
[log]
date = iso
[user]
useConfigOnly = true