-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgitconfig.sh
executable file
·32 lines (27 loc) · 1.22 KB
/
gitconfig.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
31
32
#!/bin/bash
# ------------------------------------------------------------------------------
# Updates git global config file.
# ------------------------------------------------------------------------------
# Add default user name and email.
git config --global user.name "Jeffrey Sadeli"
git config --global user.email "[email protected]"
# TODO: Configure GPG keys for system.
# TODO: Configure GPG keys in vscode.
# TODO: Configure GPG keys in git.
# git config --global user.signingkey 1234567890123456
# git config --global commit.gpgSign true
# git config --global tag.gpgSign true
# ------------------------------------------------------------------------------
# set VSCode specific configurations
if ! command -v code &> /dev/null; then
echo "'Visual Studio Code' is not installed."
exit
else
echo "'Visual Studio Code' found, configuring..."
git config --global core.editor "code --wait"
git config --global core.autocrlf input
git config --global diff.tool vscode
git config --global difftool.vscode.cmd "code --wait --diff \$LOCAL \$REMOTE"
git config --global merge.tool vscode
git config --global mergetool.vscode.cmd "code --wait --merge \$REMOTE \$LOCAL \$BASE \$MERGED"
fi