git-switch-profile/.git-switch-user

8 lines
267 B
Bash
Executable File

#!/bin/bash
profile=$1
name=$(git config -f ~/.git.d/$profile --get user.name )
email=$(git config -f ~/.git.d/$profile --get user.email )
echo "profile = $profile name = $name email = $email"
git config --local user.name $name
git config --local user.email $email