Created
May 12, 2017 06:34
-
-
Save lethean/e6637a7095dee9338e4cdb72a04d4ec9 to your computer and use it in GitHub Desktop.
Initialize default 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/sh | |
git_set() { | |
git config --global "$1" "$2" | |
} | |
#git_set user.name "$1" | |
#git_set user.email "$2" | |
# Set default editor | |
git_set core.editor vim | |
# Show UTF-8 characters properly | |
git_set core.quotepath false | |
# Set default whitespace policy | |
git_set core.whitespace trailing-space,space-before-tab | |
# Use color for git interface | |
git_set color.ui true | |
git_set color.branch true | |
git_set color.diff true | |
git_set color.interactive true | |
git_set color.status true | |
# Allow 'git clone emstone:xxx.git' | |
git_set url.git@git.emstone.com:.insteadOf emstone: | |
# Set rebasing by default | |
git_set branch.master.rebase true | |
git_set branch.autosetuprebase always | |
# Specify push default action | |
git_set push.default matching | |
# Prevent out-of-memory on 'git gc --aggressive' | |
git_set gc.aggressiveWindow 100 | |
# Do not delta compression of big files above 64 MiB (default is 512 MiB) | |
git_set core.bigFileThreshold 64m | |
# Add useful aliases | |
git_set alias.ci 'commit -a' | |
git_set alias.unstage 'reset HEAD' | |
git_set alias.st 'status' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment