-
Notifications
You must be signed in to change notification settings - Fork 0
/
setGitEnv.sh
executable file
·21 lines (21 loc) · 965 Bytes
/
setGitEnv.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh
#-----------------------------------------------------------------
# Shell Script to setup the local Git Environment
# Author : Eduardo Rocha - ehrocha@gmail.com
#-----------------------------------------------------------------
# Variable Initialization
# Package jq is required for parsing the JSON file
#-----------------------------------------------------------------
ufname=$(jq -r '.ufname' ~/.github/config.json);
umail=$(jq -r '.umail' ~/.github/config.json);
#-----------------------------------------------------------------
# Setting Up UserName and Email
#-----------------------------------------------------------------
git config --global user.name "${ufname}";
git config --global user.email "${umail}";
#-----------------------------------------------------------------
# Confirm the changes
#-----------------------------------------------------------------
git config --global user.name
git config --global user.email
git config --list