gouf
6/14/2016 - 5:16 AM

Switch git author

Switch git author

function switch_git_config () {
  name=$1
  email=$2

  git config --global user.name $name
  git config --global user.email $email
  echo "Configuration has changed:"
  echo "git config user.name: $(git config user.name)"
  echo "git config user.email: $(git config user.email)"
}

function example_user () {
  switch_git_config "example" "example@example.com"
}

function example_user2 () {
  switch_git_config "example" "example@example.com"
}