-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgitconfig
57 lines (57 loc) · 1.75 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
[user]
name = Victor Otávio Ferreira
email = victor@ferreira.id
signingKey = <GPG_KEY_ID>
[core]
excludesfile = ~/.gitignore
attributesfile = ~/.gitattributes
editor = nano
[init]
defaultBranch = master
[fetch]
prune = true
[pull]
rebase = true
[push]
default = current
followTags = true
[commit]
gpgSign = true
[tag]
forceSignAnnotated = true
[branch "master"]
mergeoptions = --no-ff
[alias]
c = clone --recursive
d = diff --patch-with-stat
ap = add --patch
tags = tag -l
branches = branch -a
remotes = remote -v
amend = commit --amend
credit = "!f() { git commit --amend --author \"$1 <$2>\" -C HEAD; }; f"
master = "!git remote show origin | sed -n '/HEAD branch/s/.*: //p'"
sync = "!git merge origin $(git master)"
update = "!git pull origin $(git rev-parse --abbrev-ref HEAD) --rebase"
squash = "!git rebase -v -i $(git master)"
pub = push origin HEAD --force-with-lease
undo = "!git reset --soft HEAD~"
undopush = push -f origin HEAD^:master
l = "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
go = "!git add -A && (git diff-index --quiet HEAD || git commit -m \"$(curl --silent 'https://whatthecommit.com/index.txt')\") && git push -u"
pr = "!f() { \
open \"$(git ls-remote --get-url $(git config --get branch.$(git rev-parse --abbrev-ref HEAD).remote) \
| sed 's|git@github.com:\\(.*\\)$|https://github.com/\\1|' \
| sed 's|\\.git$||'; \
)/compare/$(\
git config --get branch.$(git rev-parse --abbrev-ref HEAD).merge | cut -d '/' -f 3- \
)?expand=1\"; \
exit 0; \
}; f"
hub = "!f() { \
open \"$(git ls-remote --get-url \
| sed 's|git@github.com:\\(.*\\)$|https://github.com/\\1|' \
| sed 's|\\.git$||'; \
)\"; \
exit 0; \
}; f"