-
-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathgit.sh
More file actions
executable file
·25 lines (18 loc) · 723 Bytes
/
git.sh
File metadata and controls
executable file
·25 lines (18 loc) · 723 Bytes
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
#!/usr/bin/env bash
###############################################################################
# Configure Git #
###############################################################################
# no gitconfig yet, copy template and ask infos
if [ ! -f ~/.gitconfig ]; then
# Copy gitignore and gitconfig template files
sudo cp -r -f ./gitfiles/.git* ~/
# Set-up name
read -p "Enter your Full Name for Git: " name
git config --global user.name "$name"
# Set-up email
read -p "Enter your Email for Git: " email
git config --global user.email "$email"
fi
# add gpg-agent config
mkdir ~/.gnupg
cp ./gpg-agent.conf ~/.gnupg/gpg-agent.conf