forked from KurtPreston/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgitconfig.erb
52 lines (52 loc) · 2.02 KB
/
gitconfig.erb
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
<% print("Your Name: "); STDOUT.flush; name = STDIN.gets.chomp %>
<% print("Your Email: "); STDOUT.flush; email = STDIN.gets.chomp %>
<% unless $promptless %>
[user]
name = <%= name %>
email = <%= email %>
<% end %>
[alias]
co = checkout
br = branch
st = status
rb = !sh -c 'git fetch && git checkout --track -b $0 origin/$0'
rl = branch -a
lg = log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%%an>%Creset' --abbrev-commit --date=relative
sup = !sh -c 'git submodule update --init --recursive && git submodule status'
pup = !sh -c 'git submodule update --init --recursive && git submodule status'
su = !sh -c 'git submodule -q foreach git pull -q origin master'
autoformat = !sh -c 'git rev-parse && cp ~/.bin/pre-commit $(git rev-parse --show-cdup).git/hooks/ && echo "Autoformat enabled on commit"'
g = grep --break --heading --line-number
ignore = update-index --assume-unchanged
unignore = update-index --no-assume-unchanged
ignored = !git ls-files -v | grep "^[[:lower:]]"
pullall = "!f(){ git pull \"$@\" && git submodule update --init --recursive; }; f"
sgrep = "!f() { git grep \"$1\"; git submodule foreach \"git grep '$1'; true\" | grep -B 1 \"$1\"; }; f"
rs = submodule foreach git reset --hard
si = stash-index
recent = for-each-ref --count=10 --sort=-committerdate refs/heads/ --format="%(refname:short)"
overview = log --all --since='2 weeks' --oneline --no-merges
recap = log --all --oneline --no-merges --author="<%= email %>"
today = log --since=00:00:00 --all --no-merges --oneline --author="<%= email %>"
graph = log --graph --all --decorate --stat --date=iso
[color]
diff = auto
status = auto
branch = auto
ui = auto
[core]
excludesfile = <%= ENV['HOME'] %>/.gitignore
editor = vim
autocrlf = input
pager = less -S
[apply]
whitespace = nowarn
[format]
pretty = %C(yellow)%h%Creset %s %C(red)(%cr)%Creset
[grep]
lineNumber = true
[push]
default = tracking
recurseSubmodules = check
[init]
templatedir = ~/.git-template