-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.gitconfig
62 lines (52 loc) · 1.88 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
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#
# ~/.gitconfig
#
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# HELPERS
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# Revert by range
#
# @description Revert to previous commits range
# @variable X = range to revert
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# $ git revert HEAD~X..HEAD
[user]
# email = jgcorradi@gmail.com
email = julio.corradi@bhub.ai
name = Julio Gori Corradi
[credential]
username = juliogc
[alias]
undopush = push -f origin HEAD^:master
undocommit = reset --hard HEAD@{1} # undo merges too
unchanged = git update-index --assume-unchanged
# lazy alias
change = "!f() { INITIAL='[';BRANCH=$(git rev-parse --abbrev-ref HEAD);FINAL='] ';USER_MESSAGE=$1;MESSAGE=$INITIAL$BRANCH$FINAL$USER_MESSAGE; git add . && git commit -am \"$MESSAGE\"; }; f"
lg = log --graph --pretty=format:'%C(bold red)%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)%an%Creset' --abbrev-commit --date=relative
purge = !"git branch -d $(git branch --merged main | grep -v -e '*' -e 'main')"
show-files = "!f() { git show --name-only --pretty=\"%C(bold green)%B\" | sed \"/^$/d\" | tail -n +2; }; f"
list-commits = !git shortlog -s -n
[core]
whitespace = space-before-tab,indent-with-non-tab,trailing-space
editor = nvim
[color]
branch = auto
diff = auto
interactive = auto
status = auto
ui = auto
[apply]
# Detect whitespace errors when applying a patch
whitespace = fix
[merge]
# Include summaries of merged commits in newly created merge commit messages
log = true
summary = true
# Use 'origin' as the default remote on the 'master' branch in all cases
[branch "master"]
remote = origin
merge = refs/heads/master
push = HEAD
[pager]
branch = false