forked from josephmcgovern-wf/dev-personal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
69 lines (69 loc) · 2.55 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
[alias]
co = checkout
cim = commit -m
new = checkout -b
save = commit --amend --no-edit
pom = pull origin master
# Clear up local branches by asking if you want to delete each one
cleanup = "!python ~/local_scripts/cleanup_branches.py"
# Clean up local branches, smartly
scleanup = "!git branch --merged | egrep -v \"(^\\*|master|dev)\" | xargs git branch -d"
# Clean up remote branches
rcleanup = "!git fetch --prune; git branch --remote --merged | grep origin | grep -v '>' | grep -v master | xargs -L1 | cut -d"/" -f2- | xargs git push origin --delete;"
pr = "!gh pr create --web"
branch-current = rev-parse --symbolic-full-name --abbrev-ref HEAD
add-no-ws = "!git diff -U0 -w --no-color | git apply --cached --ignore-whitespace --unidiff-zero -"
pu = "!git push upstream $(git branch-current)"
po = "!git push origin $(git branch-current)"
number-of-commits-since-master = "! sh -c 'git log master..`git branch-current` --oneline | wc -l | tr -d \" \"'"
squash = "! sh -c 'git rebase --interactive HEAD~`git number-of-commits-since-master`'"
squash2 = "! sh -c 'git rebase --interactive `git branch-current`~`git number-of-commits-since-master` `git branch-current`'"
# Get the first commit message
fcm = "!git log master..$(git branch-current) --oneline | tail -1 | cut -d ' ' -f2-"
# Copy the first commit message to clipboard
cfcm = "!git fcm | pbcopy"
# Force push the current branch
fp = "!git push origin $(git branch-current) -f"
sdiff = "!f() { git diff $(git merge-base ${1:-master} HEAD)..HEAD; }; f"
emend = commit --amend
[user]
name = First Last
email = youremail@email.com
signingkey = 4292EA76FB47B590
[push]
default = matching
[filter "lfs"]
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
clean = git-lfs clean -- %f
[core]
editor = vim
excludesfile = /Users/joemcgovern/.gitignore
pager = ~/Dev/scripts/diff-it.sh
# pager = diff-so-fancy | { read -d '' stdin; echo $stdin | grep -qE "(modified|added|deleted|commit): " && less --tabs=4 --pattern '^(modified|added|deleted|commit):' -QRXFS $stdin || less --tabs=4 -QRXFS; }
# pager = diff-so-fancy | less --tabs=4 -QRXFS
[commit]
template = /Users/joemcgovern/.gitmessage
[color]
ui = true
[color "diff-highlight"]
oldNormal = red bold
oldHighlight = red bold 52
newNormal = green bold
newHighlight = green bold 22
[color "diff"]
meta = yellow
frag = magenta bold
commit = yellow bold
old = red bold
new = green bold
whitespace = red reverse
[pull]
rebase = true
[rerere]
enabled = false
[help]
autocorrect = 20
[diff-so-fancy]
first-run = false