Skip to content

Instantly share code, notes, and snippets.

@Stargator
Created May 3, 2018 18:08
Show Gist options
  • Save Stargator/ebcc19e0443a9d5070828e19b7e0f347 to your computer and use it in GitHub Desktop.
Save Stargator/ebcc19e0443a9d5070828e19b7e0f347 to your computer and use it in GitHub Desktop.
#!/bin/bash
name=JohnnyFive
email=five@johnny.alive
if [ -z ${1+x} ]; then
echo "No arguments passed, using version default values";
else
name=$1;
if [ -z ${2+x} ]; then
echo "No email argument passed, using version default email";
else
email=$2;
fi
fi
git config --local user.name $name
git config --local user.email $email
echo "Set Git User as $name"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment