-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
43 lines (40 loc) · 1.43 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]
name = chan-dev
email = [email protected]
[merge]
tool = vimdiff
[mergetool]
keepBackup = false
[mergetool "vimdiff"]
cmd = nvim -d $LOCAL $REMOTE $MERGED -c '$wincmd w' -c 'wincmd J'
[core]
editor = vim
[alias]
ol = log --oneline
d = diff
dc = diff --cached
dd = diff --check --dirstat --find-copies --find-renames --histogram --color
sb = status
# use abbreviated status (eg. M - Modified)
sbs = status -s
# expand the folder to show untracked files (this has the effect of expanding folders to show contents)
sbu = status -u
ll = log --graph --topo-order --abbrev-commit --date=short --decorate --all --boundary --pretty=format:'%Cgreen%ad %Cred%h%Creset -%C(yellow)%d%Creset %s %Cblue[%cn]%Creset %Cblue%G?%Creset'
uncommit = reset --soft HEAD~1
cm = commit -m
override = commit --amend --no-edit
# useful when you want to update the commit message from the previous commit
editmsg = commit --reedit-message=HEAD
fu = commit --fixup
rif = rebase -i --autosquash
# find deleted stash or any dangling commits
fds = fsck --no-reflog --dangling
commitcopy = commit --reedit-message=HEAD@{0}
list-subtrees = !"git log | grep git-subtree-dir | awk '{ print $2 }' | uniq"
; [url "[email protected]:"]
; insteadOf = https://github.com/
[init]
defaultBranch = main
[credential "https://github.com"]
helper =
helper = !/usr/bin/gh auth git-credential