forked from oconnor663/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgitconfig
71 lines (63 loc) · 2.12 KB
/
gitconfig
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
# fill your name and email
[user]
name = Austin Longino
email = [email protected]
[color]
diff = auto
status = auto
branch = auto
[alias]
# Some helpfull shorthands
br = branch -v
co = checkout
ci = commit
cia = commit --amend
di = diff
st = status
nb = !git new-branch
# creates a new branch
new-branch = !sh -c 'git co -b $1 `git reposource`' -
# Show the commits and content in this branch
showbr = !git log --pretty=oneline `git reposource`..HEAD
showallbr = !git log -U `git reposource`..
# Change the HEAD commit message to the template and edit
amd = !git commit --amend -eF `git config commit.template`
# Safe remove all branches reachable from HEAD. Good way to GC old branches after dcommit/rebase
gcbr = !git branch --no-track --no-color --merged | sed 's/[ *]*//' | xargs -n1 git branch -d &> /dev/null || exit 0
# Spellcheck your commit message
aspell = !git log --pretty=format:%s%n%n%b -n1 > /tmp/aspell.txt && aspell -c /tmp/aspell.txt && git commit --amend -F /tmp/aspell.txt
# Commit changes to current head as amended commit
plus = commit --amend -a -C HEAD
# Grep with color and line numbers
gr = grep --color -n
# Prints out git blame with syntax coloring. Get colorize_git_blame_pipe.sh and colorize_git_blame.pl from ~eyal/bin and add them to your path
bl = !sh -c 'colorize_git_blame_pipe.sh $1' -
# Prints out the name of the branch from which the repo fetches. used as a helper for other aliases
reposource = !git show-ref --verify --quiet refs/remotes/origin/master && echo origin/master || echo trunk
[svn]
followparent = true
[push]
default = tracking
# Show a log of '56 minutes ago' rather than 'November 12, 2008 12:34:53'
[log]
date = relative
# Use only for black background terminal
[color "branch"]
current = yellow reverse
local = yellow
remote = green
[color "diff"]
[color "status"]
added = yellow
changed = green
untracked = cyan
[core]
excludesfile = ~/.gitignore
autocrlf = input
[diff]
# get git_diff_wrapper from ~eyal/bin/git_diff_wrapper and add it to your path
external = git_diff_wrapper
[pager]
diff =
[merge]
tool = vimdiff