-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitconfig
60 lines (59 loc) · 2.83 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
[core]
excludesfile = ~/.gitignore_global
editor = code -w
[alias]
st = !git status && printf '\n' && git recent && printf '\n' && git stash list
co = checkout
pulp = pull -p --ff-only
cob = !gci
commitit = commit --amend --no-edit
forcepull = !git reset --hard HEAD~20 && git pull
# Rebase from the specified branch or from the most recent shared commit
rebase-from-branch = !sh -c 'git rebase -i $(git first-shared-commit $0)'
rebase-onto = !sh -c 'git rebase --onto=$0 $(git merge-base $0 HEAD)'
last = diff --name-status HEAD^ HEAD
blow = !git reset --hard && git clean -fd
lg = log -10 --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
lgg = log -20 --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
lgm = log -25 --author="Seethaler" --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
lgs = !git lg --shortstat --ignore-space-change
lga = log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit
lgb = log --graph --oneline --decorate --all
allamendpush = !git add . && git stagedamendpush
stagedamendpush = !git commit --amend --no-edit && git push -f
rebmaster = !git co master && git pulp && git co - && git rebase master
local = !git branch -vv | cut -c 3- | awk '$3 !~/\\[/ { print $1 }'
# { cat; echo; } adds a new line to last line so tail -r doesn't combine the last two lines
changes = "!git log master.. --pretty=format:%s | sed 's/^/- /' | { cat; echo; } | tail -r | pbcopy"
peek = "!git merge --no-commit --no-ff $1"
# Advanced commands that are piped into node script
review-merge-file = !sh -c '~/Developer/mac-init/git_actions.js reviewMergeFile $0 "$@" | sh'
first-shared-commit = !sh -c '~/Developer/mac-init/git_actions.js firstShared $0'
search-blame = !sh -c '~/Developer/mac-init/git_actions.js searchBlame $0'
delete-merged-branches = !sh -c '~/Developer/mac-init/git_actions.js deleteMergedBranches $0'
pushy = !sh -c '~/Developer/mac-init/git_actions.js pushNewBranch $0'
[diff]
tool = default-difftool
[difftool "default-difftool"]
cmd = code --wait --diff $LOCAL $REMOTE
prompt = false
[user]
name = Dan Seethaler
email = [email protected]
[commit]
template = ~/.stCommitMsg
[credential]
helper = osxkeychain
[difftool "sourcetree"]
cmd = opendiff \"$LOCAL\" \"$REMOTE\"
path =
[mergetool "sourcetree"]
cmd = /Applications/Sourcetree.app/Contents/Resources/opendiff-w.sh \"$LOCAL\" \"$REMOTE\" -ancestor \"$BASE\" -merge \"$MERGED\"
trustExitCode = true
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[push]
default = upstream