Last active
October 14, 2022 10:24
-
-
Save fkirc/bdf37858f72452448180ddcfda0d9a1a to your computer and use it in GitHub Desktop.
My global 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
#!/bin/bash | |
set -e | |
set -x | |
# It would be painful to repeat credentials every time. | |
# This should store them to ~/.git-credentials | |
git config --global credential.helper store | |
# Default merge | |
git config --global pull.rebase false | |
# autoSetupRemote makes it easier to push new branches | |
git config --global --add --bool push.autoSetupRemote true | |
# Aliases help to increase the development productivity. | |
git config --global alias.co checkout | |
git config --global alias.br branch | |
git config --global alias.ci commit | |
git config --global alias.st status | |
git config --global alias.fo 'fetch origin' | |
git config --global alias.fod 'fetch origin develop:develop' | |
git config --global alias.fom 'fetch origin master:master' | |
git config --global alias.plo 'pull origin' | |
git config --global alias.po 'push origin' | |
git config --global alias.plom 'pull origin master' | |
git config --global alias.pom 'push origin master' | |
git config --global alias.plod 'pull origin develop' | |
git config --global alias.pod 'push origin develop' | |
# I do not like it if a version control system changes even a single bit of the committed data. | |
# A checkout should be exactly the same as the upstream bits. | |
# autocrlf false is a mitigation against this behaviour. | |
git config --global core.autocrlf false | |
git config --list | |
cat ~/.gitconfig |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
wget -O - https://gist.githubusercontent.com/fkirc/bdf37858f72452448180ddcfda0d9a1a/raw | bash