Skip to content

Instantly share code, notes, and snippets.

@aliou
Created June 2, 2012 08:37
Show Gist options
  • Save aliou/2857347 to your computer and use it in GitHub Desktop.
Save aliou/2857347 to your computer and use it in GitHub Desktop.
git config
echo "Set your name & email to be added to your commits, and your github authentification."
echo -n "Please enter your name: "
read git_name
echo -n "Please enter your email: "
read git_email
echo -n "Please enter your github username: "
read github_username
echo -n "Please paste your github token: "
open https://github.com/settings/admin
read github_token
# Sets the name of the user for all git instances on the system
git config --global user.name "$git_name"
# Sets the email of the user for all git instances on the system
git config --global user.email "$git_email"
# Sets the GitHub username for all git instances on the system
git config --global github.user $github_username
# Sets the GitHub token for all git instances on the system
git config --global github.token $github_token
git config --global core.editor vim
git config --global color.ui true
git config --global core.excludesfile ~/.gitignore
git config --global core.autocrlf input
git config --global branch.master.remote origin
git config --global branch.master.merge refs/heads/master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment