-
Notifications
You must be signed in to change notification settings - Fork 0
/
.gitconfig
executable file
·36 lines (32 loc) · 1.54 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
# This is Git's per-user configuration file.
[user]
name = Emmanuel Lebeaupin
[pull]
rebase = true
[alias]
# Quote / unquote a sh command, converting it to / from a git alias string
quote-string = "!read -r l; printf !; printf %s \"$l\" | sed 's/\\([\\\"]\\)/\\\\\\1/g'; printf \"\\n\""
quote-string-undo = "!read -r l; printf %s \"$l\" | sed 's/\\\\\\([\\\"]\\)/\\1/g'; printf \"\\n\""
change-commits = "!f() { VAR1=$1; VAR='$'$1; OLD=$2; NEW=$3; echo \"Are you sure for replace $VAR $OLD => $NEW ?(Y/N)\";read OK;if [ \"$OK\" = 'Y' ] ; then shift 3; git filter-branch --env-filter \"if [ \\\"${VAR}\\\" = '$OLD' ]; then export $VAR1='$NEW';echo 'to $NEW'; fi\" $@; fi;}; f "
st = status
lg = log --graph --date='format:%Y-%m-%d %H:%M' --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cd - %cr/%ad) %C(bold blue)<%an>%Creset' --abbrev-commit
fixup = !sh -c 'REV=$(git rev-parse $1) && git commit --fixup $@ && git rebase -i --autosquash $REV^' -
d = "!git diff"
dc = "!git diff --cached"
fbr = !sh -c \"BRANCH=$(git --no-pager branch -vv | fzf +m | sed 's/[[:space:]\\*]*\\([^ ]*\\)[[:space:]].*/\\1/') && git checkout \\$BRANCH\"
prune-branches = !git remote prune origin && git branch -vv | grep ': gone]' | sed 's/^[\\* ] //' | awk '{print $1}' | xargs -r git branch -D
[credential]
helper = cache
[diff]
tool = vscode
[difftool "vscode"]
cmd = code --wait --diff $LOCAL $REMOTE
[difftool]
prompt = false
[mergetool]
keepBackup = false
[delta]
features = line-numbers
syntax-theme = 1337
[core]
pager = delta