Last active
November 10, 2021 12:55
-
-
Save gsoulavy/3188ce7cd389a0ca7029ee9bda805b43 to your computer and use it in GitHub Desktop.
.gitconfig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[user] | |
name = Gab Soulavy | |
email = [email protected] | |
signingKey = xxx | |
[core] | |
autocrlf = input | |
fileMode = false | |
[alias] | |
last = log -1 HEAD | |
alias = config --get-regexp ^alias\\. | |
ast-oneline = log --format=\"%h %B\" --oneline -n 1 | |
logn = log --format=\"%C(auto,yellow)%h %C(auto,red)%ad %<(15,trunc)%C(auto,blue)%aN %C(auto,white) | %<(94,trunc)%s\" --date=iso-strict --max-count | |
squash = !f(){ git reset --soft HEAD~${1} && git commit --edit -m\"$(git log --format=%B --reverse HEAD..HEAD@{1})\"; };f | |
todos = grep --extended-regexp -I --line-number --break --heading --color=auto \"TODO|FIXME\" | |
new = checkout -b | |
s = status | |
co = checkout | |
a = add | |
c = commit | |
add-commit = !git a -A && git c | |
ac = add-commit | |
panic = !f(){ git reset --hard && git clean -fdx; };f | |
stash-unapply = !git stash show -p | git apply -R | |
# Find branches | |
findbranch = !git branch -a | grep $@ | head -n 1 | sed 's/remotes\\/origin\\///' && : # Finds all branches, including remotes | |
fb = !git findbranch | |
find = !git $1 $(git findbranch ${*:2}) && : # defaults to findbranch | |
amend = !git add -A && git commit --amend --no-edit | |
jedi = push -f | |
rfo = !git fetch origin && git reset --hard | |
acmp = "!f() { git add -A && git commit -m \"$@\" && git push; }; f" | |
p = push | |
current = rev-parse --abbrev-ref HEAD | |
publish = !git p -u origin $(git current) | |
pub = publish | |
[merge] | |
tool = vimdiff | |
[mergetool] | |
keepBackup = false | |
[commit] | |
gpgsign = true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment