-
Notifications
You must be signed in to change notification settings - Fork 1
/
gitconfig
48 lines (36 loc) · 1.24 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
[user]
name = Glen Takahashi
email = [email protected]
[core]
editor = vim
[color]
diff = auto
status = auto
branch = auto
ui = auto
[alias]
# View abbreviated SHA, description, and history graph of the latest 20 commits
l = log --pretty=oneline --decorate -n 20 --graph --abbrev-commit
la = log --pretty=oneline --decorate -n 20 --graph --abbrev-commit --all
# View the current working tree status using the short format
s = status -s
st = status
# shortcuts
ci = commit
al = add . --all
# find text
find = !"git log --source --all -S "
#clone one of my own repos
cc = !"git clone [email protected]:glentakahashi/$1"
# Show the diff between the latest commit and the current state
d = !"git diff-index --quiet HEAD --; git --no-pager diff --patch-with-stat"
# `git di $number` shows the diff between the state `$number` revisions ago and the current state
di = !"d() { git diff --patch-with-stat HEAD~$1; }; git diff-index --quiet HEAD --; d"
# Show verbose output about tags, branches or remotes
tags = tag -l
branches = branch -a
remotes = remote -v
# Amend the currently staged files to the latest commit
amend = commit --amend --reuse-message=HEAD
[rebase]
instructionFormat = (%an <%ae>) %s