/
gitconfig
58 lines (58 loc) · 2.3 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
[init]
templatedir = ~/.git_template
defaultBranch = main
[push]
default = current
[color]
ui = auto
[alias]
aa = add --all
ap = add --patch
branches = 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 --amend
ci = commit -v
co = checkout
co-pr = !sh -c 'git fetch origin pull/$1/head:pr/$1 && git checkout pr/$1' -
create-branch = !sh -c 'git push origin HEAD:refs/heads/$1 && git fetch origin && git branch --track $1 origin/$1 && cd . && git checkout $1' -
delete-branch = "!f() { git branch -D $1 && git push origin --delete $1; }; f"
ctags = "!sh -c '[ -f .git/hooks/ctags ] || git init; .git/hooks/ctags' git-ctags"
dc = diff --cached
dm = diff main
done = !git merge-branch && g push origin master
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cblue%an%Creset %Cgreen(%cr)%Creset' --abbrev-commit --date=relative
lol = log --pretty=oneline --abbrev-commit --graph --decorate
merge-branch = !git checkout main && git merge @{-1}
mm = !test `git rev-parse master` = $(git merge-base HEAD master) && git checkout master && git merge HEAD@{1} && rake && git push && git delete-branch $(git rev-parse --abbrev-ref @{-1}) || echo "Non-fastforward"
pf = push --force-with-lease
pr = !hub pull-request
rc = rebase --continue
selfauthor = commit --amend --author='Jason Draper <jason@drapergeek.com>'
st = status
uf = reset --hard HEAD
up = !git fetch origin && git rebase origin/master
addon = commit --amend --no-edit
lasttag = !"$(git fetch origin &> /dev/null)" && git describe --abbrev=0 --tags origin
ready = "!git log $(git lasttag)..master --first-parent"
readyfiles = "!git diff --name-status $(git lasttag)..master"
compare = "!open https://github.com/$(git remote get-url origin | rev | cut -f 1-2 -d / | cut -f 1 -d : | rev | cut -f 1 -d .)/compare/$(git lasttag)...$(git show-ref master -s | head -1)"
[core]
excludesfile = ~/.gitignore
autocrlf = input
ignorecase = false
[merge]
ff = only
[commit]
template = ~/.gitmessage
[fetch]
prune = true
[user]
name = Jason Draper
email = jason@drapergeek.com
[rerere]
enabled = 0
[hub]
protocol = https
[diff]
compactionHeuristic = true
[pull]
ff = only