Skip to content

Instantly share code, notes, and snippets.

@makunomark
Created September 27, 2018 03:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save makunomark/450671ba37e85705b7d8421bf220f888 to your computer and use it in GitHub Desktop.
Save makunomark/450671ba37e85705b7d8421bf220f888 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
@jumaallan
Copy link

to run: ./switch_git

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