-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.gitconfig
More file actions
50 lines (50 loc) · 1.86 KB
/
.gitconfig
File metadata and controls
50 lines (50 loc) · 1.86 KB
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
[user]
name = Alec Buckenheimer
email = abuckenheimer@gmail.com
[push]
default = simple
[color]
ui = true
[color "status"]
added = green
modified = yellow
changed = yellow
[alias]
# every day use
s = status --branch -s
l = log --pretty=format:'%C(yellow)%h %Cgreen%an %Cblue(%ad): %Creset%s' --graph --date=short
co = checkout
diff = diff -w
ff = pull --ff-only
cm = commit -m
ca = commit --amend --no-edit
# utility
# push a branch for the first time
pushb = !git push --set-upstream origin $(git rev-parse --abbrev-ref HEAD)
pr = !git pushb && gh pr create -f
# when I forget what I have been working on
me = log --pretty=format:'%C(yellow)%h %Cgreen%an %Cblue(%ad): %Creset%s' --graph --date=short --author=abuckenheimer
last = log -p --follow -n 1
# drop WIP
nuke = checkout --
# edit last commit
undo = reset HEAD~1 --soft
# show the previous version of something
prev = !git show $(git log --pretty=format:'%h' --skip ${2:-1} $1 -n 1):$1
# collapse n commmits into one, may be better served by rebase -i
# conflict resolution
theirs = "!f() { git checkout --theirs -- \"${@:-.}\"; git add -u \"${@:-.}\"; }; f"
mine = "!f() { git checkout --ours -- \"${@:-.}\"; git add -u \"${@:-.}\"; }; f"
# cleanup
prune-branches = !git branch --merged master | grep -v -E '(master|prod)' | xargs git branch -d
[core]
editor = vim
# pager = delta --plus-color="green" --minus-color="red" --theme='Monokai Extended'
# pager = delta --dark --keep-plus-minus-markers --plus-color="#000000" --minus-color="#000000"
# pager = delta --plus-color="#012800" --minus-color="#340001" --light
# [interactive]
# diffFilter = delta --color-only
# force using ssh keys
[url "git@github.com:"]
insteadOf = https://github.com/
insteadOf = https://github.com/