forked from kinoute/macos-setup
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgit.sh
executable file
·38 lines (28 loc) · 1.34 KB
/
git.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
33
34
35
36
37
38
#!/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/.* ~/
# 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
# Diff colors
git config --global core.pager "diff-so-fancy | less --tabs=4 -RFX"
git config --global color.ui true
git config --global color.diff-highlight.oldNormal "red bold"
git config --global color.diff-highlight.oldHighlight "red bold 52"
git config --global color.diff-highlight.newNormal "green bold"
git config --global color.diff-highlight.newHighlight "green bold 22"
git config --global color.diff.meta "11"
git config --global color.diff.frag "magenta bold"
git config --global color.diff.commit "yellow bold"
git config --global color.diff.old "red bold"
git config --global color.diff.new "green bold"
git config --global color.diff.whitespace "red reverse"