-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdot_gitaliases
42 lines (34 loc) · 1004 Bytes
/
dot_gitaliases
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
# Add this to your ~/.gitconfig file to add these git aliases.
# [include]
# path = .gitaliases
#
[alias]
# From https://gist.github.com/mwhite/6887990
# One-line log.
l = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short --color=always
a = add
ap = add -p
c = commit --verbose
ca = commit -a --verbose
cm = commit -m
cmp = "!sh -c 'git commit -m \"$1\" && git push' -"
cam = commit -a -m
camp = "!sh -c 'git commit -a -m \"$1\" && git push' -"
m = commit --amend --verbose
pl = pull
p = push
d = diff
ds = diff --stat
dc = diff --cached
s = status -s
co = checkout
cob = checkout -b
# List branches sorted by last modified.
b = "!git for-each-ref --sort='-authordate' --format='%(authordate)%09%(objectname:short)%09%(refname)' refs/heads | sed -e 's-refs/heads/--'"
bd = branch -d
# Stash management.
st = stash
po = stash pop
# List aliases.
la = "!git config -l | grep alias | cut -c 7-"
# vim: syntax=gitconfig: