Last active
May 4, 2020 15:33
-
-
Save gaeljw/11b4981cc2002247a970cba168027254 to your computer and use it in GitHub Desktop.
Git configuration
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
[core] | |
# gestion des fins de ligne uniquement sur système windows | |
autocrlf = true | |
[status] | |
showUntrackedFiles = all | |
[pull] | |
# forcer un rebase plutot qu'un merge sur les pull mais conserver les éventuels merge volontaires | |
rebase = preserve | |
[push] | |
# pusher sur le branche configurée comme correspondante à notre branche locale | |
default = upstream | |
# pusher les tags en même temps que les commits | |
# dangereux avec plusieurs remotes et tags différents | |
#followTags = true | |
[fetch] | |
# Nettoyer les vieilles branches sur le fetch | |
prune=true | |
[log] | |
# indiquer le SHA1 raccourci sur git log | |
abbrevCommit = true | |
[alias] | |
stage = add | |
# reset local modifications from index but keep them | |
unstage = reset HEAD | |
# reset local modifications (forever) | |
rz = reset --hard HEAD | |
# nice graphic view | |
lol = log --graph --decorate --pretty=oneline --abbrev-commit | |
lola = log --graph --decorate --pretty=oneline --abbrev-commit --all | |
# list aliases | |
aliases = "!git config --get-regexp 'alias\\..*' | sed 's/^alias\\.\\([^ ]\\+\\)/\\1 =/'" | |
# clean branches | |
viewgone = "!git fetch --prune && LANG=en_US git branch -vv | awk \"/: gone]/{print \\$1}\"" | |
delgone = "!git fetch --prune && LANG=en_US git branch -vv | awk \"/: gone]/{print \\$1}\" | xargs git branch -d" | |
delgoneforce = "!git fetch --prune && LANG=en_US git branch -vv | awk \"/: gone]/{print \\$1}\" | xargs git branch -D" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment