-
Notifications
You must be signed in to change notification settings - Fork 0
/
gitconfig
72 lines (62 loc) · 2.42 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
# This is Git's per-user configuration file.
[user]
# Please adapt and uncomment the following lines:
# name = Miroslav Pashov
# email = [email protected]
[user]
name = mickeypash
email = [email protected]
[core]
editor = vim
[alias]
st = status
co = checkout
cob = checkout -b
ci = commit
d = diff
dc = diff --cached
dw = diff --color-words
dwc = diff --color-words --cached
desc =!git log --format=%b -1 | pbcopy # copy the message of the last commit
br = branch
up = rebase
# Start new branch
n = !git checkout -b
new-pr =! open https://bitbucket.org/touchsurgery/platform/pull-requests/new
ignore = "!gi() { IFS=\",\"; curl -L -s \"https://www.gitignore.io/api/$*\" | tee .gitignore;}; \\\ngi"
l = "!f() { tig $@ || git log --pretty=format:'%C(10)%h %C(12)%ad %C(blue)%an %C(3)%s%C(auto)%d' --date=relative $@; }; f"
gl = log --pretty=format:'%ai\t%h\t%an\t%s\t%d'
hist = log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short
last = log -1 HEAD
latest = log -n 1 --pretty=format:"%H" origin/master
url =! bash -c 'git config --get remote.origin.url | sed -E "s/.+:\\(.+\\)\\.git$/https:\\\\/\\\\/bitbucket\\\\.org\\\\/\\\\1/g"'
# Grep through all commits
hgrep = "!f() { git rev-list --all | xargs git grep $@; }; f"
sync = "!git checkout master && git pull origin master && git fetch -p origin \
&& for f in $(git branch --merged | grep -v master | grep -v '*'); do \
git branch -d $f; done"
please = push --force-with-lease
amend = commit --amend --no-edit -a
oops = "!git amend && git please"
standup = log --since '1 day ago' --no-merges --branches --author Mickey --date=relative --pretty=format':%Cgreen%cd%Creset \t%Cred%h%Creset %s'
sprint = log --since '14 day ago' --no-merges --branches --author Mickey --date=relative --pretty=format':%Cgreen%cd%Creset \t%Cred%h%Creset %s'
monday = log --since '3 day ago' --no-merges --branches --author Mickey --date=relative --pretty=format':%Cgreen%cd%Creset \t%Cred%h%Creset %s'
[diff]
algorithm = patience
[include]
path = gitalias.txt
[mailmap]
file = gitmailmap.txt
[commit]
template = ~/gitmessage.txt
[filter "lfs"]
clean = git-lfs clean -- %f
smudge = git-lfs smudge -- %f
process = git-lfs filter-process
required = true
[init]
defaultBranch = main
[push]
autoSetupRemote = true
#[blame]
# ignoreRevsFile = .git-blame-ignore-revs