forked from Nixsm/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
57 lines (57 loc) · 2.27 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
[user]
name = Nixsm
email = nichsmm@gmail.com
[core]
excludesfile = /Users/nicholas/.gitignore_global
editor = vim
[difftool "sourcetree"]
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
path =
[mergetool "sourcetree"]
cmd = /Applications/SourceTree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
trustExitCode = true
[filter "media"]
required = true
clean = git media clean %f
smudge = git media smudge %f
[push]
default = current
[alias]
a = add
cl = clean -d -f
pl = pull
ps = push
unadd = reset HEAD
ec = config --global -e # edit gitconfig
ls = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate # List commits in short form, with colors and branch/tag annotations.
ll = log --pretty=format:"%C(yellow)%h%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --numstat # List commits showing changed files
lds = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short # List oneline commits showing dates
ld = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=relative # List oneline commits showing relative dates
le = log --oneline --decorate #Default look for short git log
logtree = "log --graph --oneline --decorate --all" # same as above, but with graph
filelog = log -u # See all the commits related to a file, with the diff of the changes with git log -u
dl = "!git ll -1" # Show modified files in last commit
dlc = diff --cached HEAD^ # Show a diff last commit
dr = "!f() { git diff "$1"^.."$1"; }; f" # Show content (full diff) of a commit given a revision
lc = "!f() { git ll "$1"^.."$1"; }; f" # ^
diffr = "!f() { git diff "$1"^.."$1"; }; f" # ^
la = "!git config -l | grep alias | cut -c 7-" # List all your Aliases
permission-reset = !git diff -p -R | grep -E \"^(diff|(old|new) mode)\" | git apply
co = checkout
br = branch
ci = commit
st = status
last = log -1 HEAD
web = instaweb --httpd=webrick
webstop = instaweb --httpd=webrick --stop
permission-reset = !git diff -p -R | grep -E \"^(diff|(old|new) mode)\" | git apply
[filter "gitignore"]
clean = "sed '/#gitignore$/'d"
smudge = cat
[grep]
extendRegexp = true
lineNumber = true
[credential]
helper = osxkeychain
[url "https://"]
insteadOf = git://