Skip to content

Instantly share code, notes, and snippets.

@SepehrImanian
Last active January 11, 2023 11:29
Show Gist options
  • Save SepehrImanian/145d28ef1df8bb8a4525d2df2ca8742b to your computer and use it in GitHub Desktop.
Save SepehrImanian/145d28ef1df8bb8a4525d2df2ca8742b to your computer and use it in GitHub Desktop.
Change git user in same repo in server
#!/bin/bash
if [[ $1 = "sepehr" ]]; then
git config --local user.email "[email protected]"
git config --local user.name "sepehrimanian"
echo "Change git user to 'Sepehr'"
elif [[ $1 = "ali" ]]; then
git config --local user.email "[email protected]"
git config --local user.name "ali"
echo "Change git user to 'ali'"
elif [[ $1 = "status" ]]; then
git config --local user.email
git config --local user.name
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment