-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgitconfig_setup.sh
More file actions
executable file
·72 lines (53 loc) · 2.54 KB
/
gitconfig_setup.sh
File metadata and controls
executable file
·72 lines (53 loc) · 2.54 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/usr/bin/env bash
git config --global user.name "Naum Azeredo"
current_email=$(git config --global --get user.email)
#if current_email is empty, then add an email
if [[ -z "$current_email" ]]
then
git config --global user.email "naumazeredo@gmail.com"
fi
git config --global github.user naumazeredo
git config --global core.editor "vim"
# aliases
git config --global alias.st status
git config --global alias.co checkout
git config --global alias.ci commit
git config --global alias.br branch
git config --global alias.d difftool
git config --global alias.h help
git config --global alias.sub submodule
git config --global alias.unstage "reset HEAD"
git config --global alias.unstash "stash pop"
git config --global alias.dst "diff --staged"
git config --global alias.dc "!git diff | cdiff -s"
git config --global alias.dcs "!git diff --staged | cdiff -s"
git config --global alias.cp "cherry-pick"
git config --global alias.lg "log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --date=relative"
git config --global color.ui true
#git config --global diff.tool kdiff3
#git config --global difftool.prompt false
#git config --global merge.tool kdiff3
#git config --global alias.ks "difftool -y -t Kaleidoscope"
## This gives us 'ours', 'base', and 'theirs', instead of just 'ours' and
## 'theirs'. More details:
## http://psung.blogspot.com/2011/02/reducing-merge-headaches-git-meets.html
#git config --global merge.conflictstyle diff3
## Prevents us from having to do merge resolution for things we've already
## resolved before; see http://git-scm.com/blog/2010/03/08/rerere.html
#git config --global rerere.enabled true
# With this, "git pull --rebase" is the default form of pull FOR NEWLY CREATED
# BRANCHES; for branches created before this config option is set, pull.rebase
# true handles that
#git config --global branch.autosetuprebase always
# "git pull --rebase" is now the default for pull no matter what
#git config --global pull.rebase true
# This makes sure that push pushes only the current branch, and pushes it to the
# same branch pull would pull from
git config --global push.default upstream
## This converts CRLF endings to LF endings on Mac & Lin and also keeps them in
## the repo, but for Windows checkouts it converts LF to CRLF (and back to LF on
## commits)
#git config --global core.autocrlf input
#script_dir="$( cd "$( dirname "$0" )" && pwd )"
#git config --global alias.meld "!$script_dir/bin/git-meld/git-meld.pl"
#git config --global core.excludesfile ~/.gitignore_global