-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path_.gitconfig
55 lines (49 loc) · 1.92 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
[user]
name = Joe Blaylock
email = my_email_address
[color]
ui = auto
branch = auto
diff = auto
status = auto
interactive = auto
[alias]
; s is status, but shorter
#s = status -b -s
s = ! echo "$(git status -b -s) $(git log -1 --pretty --oneline)" | fold -s
; co = checkout is pretty common
co = checkout
; cor = checkout recent (local) - gets most recently modified local branch
cor = ! git checkout `git for-each-ref --format='%(refname:short)' --sort=-committerdate --count=1 refs/heads` && git status -b -s
; makes a pretty branch tree on color terminals (thanks to Henning Weiler)
k = log --graph --decorate --pretty=oneline --abbrev-commit
dno = diff --name-only
; if you're in the middle of a merge with conflicts and want to see
; without lines changed
; conflicts = !git ls-files -u | cut -f 2 | sort -u
; with lines changed
conflicts = !git diff --no-ext-diff --stat | head -1 | sort
; d (dir) shows the most recent branches, locally only
d = !git for-each-ref --format='%(committerdate:short): %(refname:short)' --sort=committerdate refs/heads | tail -5
; dr (dir w/ remotes) shows the most recent branches, including remotes
dr = !git for-each-ref --format='%(committerdate:short): %(refname:short)' --sort=committerdate refs | tail -5
; tld shows every branch (too-long-dir) locally only
tld = for-each-ref --format='%(committerdate:short): %(refname:short)' --sort=committerdate refs/heads
; tldr shows every branch both local and remote (too-long-dir w/ remotes)
tldr = for-each-ref --format='%(committerdate:short): %(refname:short)' --sort=committerdate refs
#[merge]
# tool = gvimdiff
# external = meld
# tool = opendiff
[diff]
# tool = gvimdiff
external = git_diff_wrapper
# external = meld
[pager]
diff =
[github]
user = my_github_username
[ghi]
token = my_github_api_token
[push]
default = current