-
Notifications
You must be signed in to change notification settings - Fork 0
/
_gitconfig
52 lines (50 loc) · 1.85 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
[alias]
lg = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
hist = log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short
lga = log --branches --tags --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
lgh = "! f() { git lg | head; }; f"
whatadded = diff-tree --no-commit-id --name-only -r
whenchanged = log -p [--follow] [-1]
codeadded = "! f() { git log --pretty=oneline -S \"$1\" --source --all; }; f"
branchdiff = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
#Sed $d removes last line, which is the summary of changes
diffsort = "! f() { git diff --stat | sed '$d' | awk '{ print $3,\"\t\",$4,\"\t\",$1}' | sort -n -r; }; f"
co = checkout
st = status
br = branch
df = diff
dfc = diff --cached
amend = commit --amend
amendne = commit --amend --no-edit
apt = add --patch
adp = add --patch
rebc = rebase --continue
rbc = rebase --continue
rbi = rebase --interactive
cm = commit -m
ca = commit -a
cam = commit -a -m
[format]
#Check what this does pretty = '%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset'
[merge]
tool = p4mergetool
[mergetool "p4mergetool"]
cmd = /Applications/p4merge.app/Contents/Resources/launchp4merge $PWD/$BASE $PWD/$REMOTE $PWD/$LOCAL $PWD/$MERGED
trustExitCode = false
[mergetool]
keepBackup = false
[diff]
tool = p4mergetool
[difftool "p4mergetool"]
cmd = /Applications/p4merge.app/Contents/Resources/launchp4merge $LOCAL $REMOTE
[color]
ui = true
diff = auto
status = auto
branch = auto
autobranch = auto
[core]
autocrlf = input
[user]
name = rolgalan
email = [email protected]