1
0
Fork 0

Autoset git user info in new-host.sh

main
Mari 5 years ago committed by GitHub
parent 8b8fa88221
commit 646085c3f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 9
      new-host.sh

@ -27,6 +27,13 @@ fi
ORIGIN=$(git ls-remote --get-url origin) ORIGIN=$(git ls-remote --get-url origin)
if [[ "$ORIGIN" != 'git@github.com:programmablereya/common-configs.git' ]]; then if [[ "$ORIGIN" != 'git@github.com:programmablereya/common-configs.git' ]]; then
git remote set-url origin git@github.com:programmablereya/common-configs.git git remote set-url origin git@github.com:programmablereya/common-configs.git
fi
sync_git_only GITMAIL=$(git config user.email)
GITUSER=$(git config user.name)
if [[ "$GITMAIL" != 'mstaib.git@reya.zone' ]] || [[ "$GITUSER" != 'Mari' ]]; then
git config user.email 'mstaib.git@reya.zone'
git config user.name 'Mari'
fi fi
sync_git_only

Loading…
Cancel
Save