-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitconfig
81 lines (62 loc) · 2.42 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
[user]
name = bergquist
email = carl.bergquist@gmail.com
signingkey = C59049BE
[color]
ui = true
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "status"]
added = yellow
changed = green
untracked = cyan
[color "diff"]
meta = yellow bold
frag = magenta bold # line info
old = red # deletions
new = green # additions
[core]
editor = vim
excludefile = ~/.gitignore
[credential]
helper = cache
[merge]
log = true # Include summaries of merged commits in newly created merge commit messages
[commit]
#gpgsign = true
[alias]
st = status -sb
amend = commit -a --amend
d = !"git diff-index --quiet HEAD -- || clear; git --no-pager diff --patch-with-stat"
ls = log --oneline
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all
co = checkout
undo = reset HEAD~1 --mixed
bclean = "!f() { git branch --merged ${1-master} | grep -v " ${1-master}$" | xargs -r git branch -d; }; f"
bdone = "!f() { git checkout ${1-master} && git up && git bclean ${1-master}; }; f"
wipe = !git add -A && git commit -qm 'WIPE SAVEPOINT' && git reset HEAD~1 --hard
# Switch to a branch, creating it if necessary
go = "!f() { git checkout -b \"$1\" 2> /dev/null || git checkout \"$1\"; }; f"
# Color graph log view
graph = log --graph --color --pretty=format:"%C(yellow)%H%C(green)%d%C(reset)%n%x20%cd%n%x20%cn%x20(%ce)%n%x20%s%n"
tags = tag -l
branches = branch -a
remotes = remote -v
# Interactive rebase with the given number of latest commits
reb = "!r() { git rebase -i HEAD~$1; }; r"
# Find branches containing commit
fb = "!f() { git branch -a --contains $1; }; f"
# Find tags containing commit
ft = "!f() { git describe --always --contains $1; }; f"
# Remove branches that have already been merged with master
# a.k.a. ‘delete merged’
dm = "!git branch --merged | grep -v '\\*' | xargs -n 1 git branch -d; git remote -v update -p"
#lists recent branches
recent-branches = 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))'
conflicts = diff --name-only --diff-filter=U --relative
[push]
default = simple
[branch]
sort = -committerdate