forked from mathiasbynens/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitconfig
78 lines (67 loc) · 1.96 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
[user]
email = [email protected]
name = Randy Pond
[color]
ui = always
diff = auto
[format]
pretty = %C(yellow)%h%Cred%d %Creset%s%Cblue [%cn]
[core]
pager = less -X
excludesfile = ~/.gitignore_global
editor = vim
[apply]
whitespace = nowarn
[merge]
log = true
[alias]
pr = pull --rebase
p = pull
graph = log --all --graph --decorate --oneline
ls = log --decorate
ll = log --decorate --stat --oneline
lb = log --no-merges master.. --decorate --stat
fl = "!git ls-files | grep -i"
grep = grep -Ii --break --heading --line-number
gr = grep -Ii --break --heading --line-number
cp = cherry-pick
st = status -s
cl = clone
ci = commit -v
co = checkout
com = checkout master
cod = checkout develop
rh = reset HEAD
# rhh = reset HEAD --hard
# rhs = reset HEAD --soft
wc = whatchanged -p --abbrev-commit --pretty=medium
wcb = whatchanged -p --abbrev-commit --pretty=medium master..
br = branch
bra = branch -a
d = diff
diff = diff --word-diff
dc = diff --cached
dch = diff --cached HEAD^
check = diff --check
sl = stash list
sa = stash apply
ss = stash save
up = !"git remote update -p; git merge --ff-only @{u}"
who = shortlog -n -s --no-merges
recent = for-each-ref --count=10 --sort=-committerdate refs/heads/ --format="%(refname:short)"
# Remove submodules
# From http://stackoverflow.com/questions/1260748/how-do-i-remove-a-git-submodule
rmsub = "!f(){ git rm --cached \"$1\";rm -r \"$1\";git config -f .gitmodules --remove-section \"submodule.$1\";git config -f .git/config --remove-section \"submodule.$1\";git add .gitmodules; }; f"
pullsub= !"git submodule foreach git pull origin master"
pushup = "!git push --set-upstream origin $(git symbolic-ref --short HEAD)"
# Finds
[push]
default = upstream
[merge]
keepBackup = false;
tool = p4merge
[mergetool "p4merge"]
cmd = p4merge "$BASE" "$LOCAL" "$REMOTE" "$MERGED"
keepTemporaries = false
trustExitCode = false
keepBackup = false