Skip to content

Instantly share code, notes, and snippets.

@fkirc
Last active October 14, 2022 10:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save fkirc/bdf37858f72452448180ddcfda0d9a1a to your computer and use it in GitHub Desktop.
Save fkirc/bdf37858f72452448180ddcfda0d9a1a to your computer and use it in GitHub Desktop.
My global git configuration
#!/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
@fkirc
Copy link
Author

fkirc commented Jan 18, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment