-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitconfig
executable file
·47 lines (47 loc) · 2.14 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
[user]
name = Mikael Brännström
email = [email protected]
[core]
editor = emacs
[color]
status = auto
branch = auto
interactive = auto
diff = auto
[alias]
glog = log --graph --abbrev-commit --pretty=oneline
lol = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative
lola = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative --all
# Called from the top-level dir. Pull from git://HOST/.
serv = daemon --reuseaddr --verbose --base-path=. --export-all ./.git
st = status #--ignore-submodules
ci = commit
br = branch
co = checkout
df = diff #--ignore-submodules
lg = log -p
# all new commits after you fetched, with stats, but excluding merges
lc = log ORIG_HEAD.. --stat --no-merges
in = log HEAD..origin/master
out = log origin/master..HEAD
# Recall that the commit which will be committed after we resolve this conflict
# will have two parents instead of the usual one: one parent will be HEAD, the
# tip of the current branch; the other will be the tip of the other branch,
# which is stored temporarily in MERGE_HEAD.
gitkconflict = !gitk --left-right HEAD...MERGE_HEAD
# "pull" or "merge" always leaves the original tip of the current branch in ORIG_HEAD.
# Hence, to see what a merge brought in, use the mdiff alias:
mdiff = !gitk --left-right HEAD...ORIG_HEAD
# Remove a file from the index: git unstage <file>
unstage = reset HEAD --
last = log -1 HEAD
whois = "!sh -c 'git log -i -1 --pretty=\"format:%an <%ae>\n\" --author=\"$1\"' -"
who = "!sh -c 'git shortlog -s -- $1 | sort -n -k1' -"
aliases = "!git config --get-regexp 'alias.*' | colrm 1 6 | sed 's/[ ]/ = /'"
oldest-ancestor = !zsh -c 'diff --old-line-format='' --new-line-format='' <(git rev-list --first-parent "${1:-master}") <(git rev-list --first-parent "${2:-HEAD}") | head -1' -
tagsbydate = log --tags --simplify-by-decoration --pretty='format:%ai %h %d'
[merge]
tool = opendiff
[push]
#default = current
default = upstream