Last active
January 2, 2016 14:19
-
-
Save pedro-stanaka/8316176 to your computer and use it in GitHub Desktop.
Git configuration with prompts. Shell (Bash) script for Debian/Based distros of Linux.
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 | |
command -v git >/dev/null 2>&1 || { echo >&2 "Git is not installed. Aborting."; exit 1; } | |
echo "\nWhat name should be used in commits globally? \n" | |
read full_name | |
git config --global user.name "$full_name" | |
echo "\nWhat email should be used in commits globally? \n" | |
read email | |
git config --global user.email $email | |
echo "\nWhat editor should be used to edit commit messages? (default: vim) \n" | |
read editor | |
if [ -z $editor -a $editor != " " ]; then | |
editor = "vim" | |
fi | |
git config --global core.editor $editor | |
git config --global color.ui true |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment