-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdot_gitconfig
More file actions
106 lines (80 loc) · 2.77 KB
/
dot_gitconfig
File metadata and controls
106 lines (80 loc) · 2.77 KB
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
[user]
name = Rayan Samy Ramoul
[commit]
template = ~/commit-template.txt
verbose = true # add more context to commit messages
[user]
name = rayanramoul
email = r.ramoul@instadeep.com
[core]
editor = nvim
[credential]
helper = /usr/local/share/gcm-core/git-credential-manager
[blame]
coloring = highlightRecent
date = relative
[diff]
context = 3 # less context in diffs
renames = copies # detect copies as renames in diffs
interHunkContext = 10 # merge near hunks in diffs
[log]
abbrevCommit = true # short commits
graphColors = blue,yellow,cyan,magenta,green,red
[push]
autoSetupRemote = true # easier to push new branches
default = current # push only current branch by default
followTags = true # push also tags
[pull]
rebase = true
[submodule]
fetchJobs = 16
[status]
branch = true
short = true
showStash = true
showUntrackedFiles = all # show individual untracked files
[alias]
co = checkout
st = status
ci = commit
cim = commit -m
cia = commit -a
wip = commit -m "WIP" -n
rbi = rebase -i
rbc = rebase --continue
# display the 10 branches with the latest commits
recent = for-each-ref --sort=-committerdate --count=10 --format='%(refname:short)' refs/heads
# delete local branches merged
dlb = "! f() { git co main && git pull -p && for branch in `git branch -vv | grep ': gone]' | awk '{print $1}'`; do git branch -D $branch; done; }; f"
# open the GitHub / GitLab repository in your browser
open = "!f(){ python -m webbrowser `git config --get remote.origin.url | sed -Ee 's#(git@|git://)#https://#' -e 's@com:@com/@' -e 's@\\.git@@'`| head -n1; }; f"
# open the issue board in your browser
# /!\ gitlab only
board = "!f(){ python -m webbrowser `git config --get remote.origin.url | sed -Ee 's#(git@|git://)#https://#' -e 's@com:@com/@' -e 's@\\.git@/-/boards@'`| head -n1; }; f"
# open the issue list in your browser
# /!\ gitlab only
issues = "!f(){ python -m webbrowser `git config --get remote.origin.url | sed -Ee 's#(git@|git://)#https://#' -e 's@com:@com/@' -e 's@\\.git@/-/issues@'`| head -n1; }; f"
# erase your current local branch with the remote one
rh =!git fetch && git reset --hard origin/$(git branch --show-current)
# display repository logs as tree
tree = log --oneline --graph --decorate --all
# Colors
[color "blame"]
highlightRecent = black bold,1 year ago,white,1 month ago,default,7 days ago,blue
[color "branch"]
current = magenta
local = default
remote = yellow
upstream = green
plain = blue
[color "diff"]
meta = black bold
frag = magenta
context = white
whitespace = yellow reverse
old = red
[color.decorate]
HEAD = red
branch = blue
tag = yellow
remoteBranch = magenta