Skip to content

Instantly share code, notes, and snippets.

@jumaallan
Forked from makunomark/README.md
Created January 13, 2019 11:13
Show Gist options
  • Save jumaallan/138bbf400570360f2c86b4b468e68ef9 to your computer and use it in GitHub Desktop.
Save jumaallan/138bbf400570360f2c86b4b468e68ef9 to your computer and use it in GitHub Desktop.
Bash script to quickly change your git configs

Set the file as an executable

On Mac

  • Save file without an extension
  • Right click and select Get info
  • Click on the lock icon (set to unlocked)
  • Open terminal and navigate to saved location on file
  • execute chmod 700 switch_git
  • run the file :-)
#!/bin/bash
git config --global user.name "sample name"
git config --global user.email "sample@sample.com"
echo Successfully set to:
git config --global user.name
git config --global user.email
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment