-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGitOwner.sh
executable file
·30 lines (26 loc) · 992 Bytes
/
GitOwner.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# Use this to set your ANON name & email in git config for the correct local repos
#
# To use:
# - add your anon name & email to the script
# - run like any unix script:
# $ path_to_script/GitOwner.sh
# - if you are already in the correct directory you need to run:
# $ ./GitOwner.sh
# - if you get a permission denied error you need to:
# Verify your current permissions:
# $ ls -la path_to_script/GitOwner.sh
# Change your permissions to:
# $ chmod 744 path_to_script/GitOwner.sh
# Set your ANON details:
NAME="your-name"
EMAIL="[email protected]"
GPG=""
echo "======= Updating git config name: $GPG ======="
git config --local user.signingkey $GPG
git config --local commit.gpgsign true
echo "======= Updating git config name: $NAME & email: $EMAIL ======="
git config --local user.name $NAME
git config --local user.email $EMAIL
echo "======= UPDATED ======="
git config --local --list
echo "^^^^^^^ Confirm name & email & gpg are changed above ^^^^^^^"