-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
71 lines (60 loc) · 2.24 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
[includeIf "gitdir:conf-pub/"]
path = .gitconfig-github
[includeIf "gitdir:workspace/"]
path = .gitconfig-github
[includeIf "gitdir:workspace/nclab/"]
path = .gitconfig-nclab
[includeIf "gitdir:workspace/bidnamic/"]
path = .gitconfig-bidnamic
[color]
ui = auto
[alias]
brs = branch -avv
co = checkout
info = remote show origin
tree = log --graph --decorate --color --pretty=oneline --abbrev-commit --all
glog = log --graph --decorate --color --name-status --abbrev-commit
gloga = log --graph --decorate --color --name-status --abbrev-commit --all
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
rso = remote show origin
# list local commits since last pull
llc = log ORIG_HEAD.. --stat --no-merges
st = status -s -b
ci = commit
rb = rebase
rbi = rebase -i
cdiff = diff --color -C -U10
cdh = diff --color -C -U10 HEAD
coh = checkout HEAD
tags = for-each-ref --format '%(objectname:short) %(refname) %(taggerdate)' --sort=-taggerdate refs/tags
#git format-patch --no-prefix --stdout trunk > patch_name.patch
#git diff --no-prefix trunk your_branch > patch_name.patch
#getting a diff between branch A and a branch B since A was forked of B
forkdiff = !bash -c 'git diff $(git merge-base "$1" "$2") "$2" "${@: 3}" ' -
# first commit (empty tree)
empty-tree-sha1 = hash-object -t tree /dev/null
# git graphviz HEAD~100..HEAD~60 | dotty /dev/stdin
# git graphviz --first-parent master | dotty /dev/stdin
graphviz = "!f() { echo 'digraph git {' ; git log --pretty='format: %h -> { %p }' \"$@\" | sed 's/[0-9a-f][0-9a-f]*/\"&\"/g' ; echo '}'; }; f"
whois = "!sh -c 'git log -i -1 --pretty=\"format:%an <%ae>\n\" --author=\"$1\"' -"
whatis = show -s --pretty='tformat:%h (%s, %ad)' --date=short
serve = daemon --reuseaddr --verbose --base-path=. --export-all ./.git
new = !sh -c 'git log $1@{1}..$1@{0} "$@"'
unstage = reset HEAD --
[core]
excludesfile = ~/.gitignore
editor = emacsclient -nw -t
[push]
default = current # simple
[merge]
tool = meld
[diff]
submodule = log
#[blame]
# ignoreRevsFile = .git-blame-ignore-revs
#[safe]
# directory = /go/src/github.com/user/repo
[gpg]
program = gpg
[init]
defaultBranch = master