-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgitconfig.txt
More file actions
53 lines (48 loc) · 1.69 KB
/
gitconfig.txt
File metadata and controls
53 lines (48 loc) · 1.69 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
[alias]
# pusho: push the current branch to origin, same name
pusho = "!f() { \
git push origin $(git rev-parse --abbrev-ref HEAD); \
}; f"
# pullo: pull the current branch from origin, same name
pullo = "!f() { \
git pull origin $(git rev-parse --abbrev-ref HEAD); \
}; f"
# lgn: pretty, colorized graph of all branches with abbreviated commit, date, relative time, decorations, and author
lgn = log --graph --abbrev-commit --decorate \
--format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' \
--all
# uncommit: undo the last commit but leave all changes staged
uncommit = reset HEAD~
# last: show only the most recent commit on HEAD
last = log -1 HEAD
# hist: one-line graph history with date, subject, refs, author and file status
hist = log --pretty=format:'%h %ad | %s%d [%an]' --graph --date=short --name-status
# empty-commit-trigger-build: create an empty commit (useful to kick off CI/CD builds)
empty-commit-trigger-build = commit --allow-empty -m 'Trigger Build'
[core]
editor = /usr/bin/vim
excludesfile = ~/.gitignore
ignorecase = false
[push]
default = simple
[color]
ui = auto
[pull]
rebase = false
# Git Diff Configuration (Using Git-Delta)
[pager]
diff = delta
log = delta
reflog = delta
show = delta
[interactive]
diffFilter = delta --color-only
[delta]
features = side-by-side line-numbers decorations
whitespace-error-style = 22 reverse
[delta "decorations"]
commit-decoration-style = bold yellow box ul
file-style = bold yellow ul
file-decoration-style = none
[init]
defaultBranch = main