-
Notifications
You must be signed in to change notification settings - Fork 4
/
gitconfig
78 lines (63 loc) · 1.79 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
[push]
default = current
[pull]
rebase = true
[merge]
ff = only
[format]
pretty = %Cblue%h%Creset %Cgreen[%ar]%Creset (%an) %s
[user]
name = Adarsh Pandit
email = adarshpandit@gmail.com
[color]
ui = auto
[alias]
a = add
aa = add --all
ap = !clear; add --patch
b = !`clear` && branch
br = for-each-ref --sort=-committerdate --format=\"%(color:blue)%(authordate:relative)\t%(color:red)%(authorname)\t%(color:white)%(color:bold)%(refname:short)\" refs/remotes
ca = commit -a
cb = checkout -b
cm = !clear && commit -vm
co = checkout
cob = checkout -b
com = checkout main
d = !clear && diff
dc = !clear && diff --cached
dm = !clear && diff origin/main
l = !clear && git log
p = push
q = rebase -i origin/main
rc = rebase --continue
sh = show
unstage = reset HEAD
wip = commit -m 'fixup! wip [ci skip]' && push
pr = !git log -n 1 --pretty=format:'%s%n%n%b' | hub pull-request -F -
squash = !git rebase -i origin/main
up = !git fetch origin && git rebase origin/main
ss = diff --shortstat origin/main
# Merge the branch you are on, push, and copy last branchname to the PasteBoard
down = !git checkout main && git merge @{-1} --ff-only && git name-rev --name-only @{-1} | pbcopy && git push
# Delete a branch both locally and on the server
delete-branch = !sh -c 'git push origin :refs/heads/$1 && git remote prune origin && git branch -D $1' -
[credential]
helper = osxkeychain
[diff-so-fancy]
markEmptyLines = false
[core]
editor = vim
ignorecase = true
excludesfile = ~/.gitignore_global
whitespace = trailing-space,space-before-tab
pager = diff-so-fancy | less -R --tabs=1,5
[apply]
whitespace = warn
[commit]
template = ~/.gitmessage
[diff]
compactionHeuristic = true
[rebase]
autoStash = true
[init]
defaultBranch = main