-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgitconfig
43 lines (39 loc) · 1.09 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
[user]
email = d.dorazio96@gmail.com
name = Daniele D'Orazio
[alias]
# shorthands
b = "branch --show-current"
c = "commit"
f = "fetch"
d = "diff"
ca = "commit --amend"
cm = "commit -m"
st = "status"
pf = "push --force"
ap = "add -p"
dp = "checkout -p"
rh = "stash-run git reset --hard origin/$(git b)"
rem = "!git stash-run git rebase origin/$(git main-branch)"
tree = "log --all --decorate --oneline --graph"
aliases = "!git config --name-only --get-regexp alias | cut -d . -f 2"
stash-run = "!f() { git stash push && eval \"$@\" && git stash pop; }; f"
main-branch = "!git symbolic-ref refs/remotes/origin/HEAD | cut -d'/' -f4"
delete-merged-branches = "!git branch --merged | grep -v '*' | xargs --no-run-if-empty git branch -d"
[init]
defaultBranch = main
[branch]
sort = -committerdate
[tag]
sort = version:refname
[diff]
algorithm = histogram
colorMoved = plain
mnemonicPrefix = true
renames = true
[push]
autoSetupRemote = true
followTags = true
[fetch]
prune = true
all = true