-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.gitconfig
executable file
·45 lines (33 loc) · 1.1 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
[user]
email = [email protected]
name = Juan Manuel Alvarez
[credential]
helper = store
#---------------------------------------------------
# Based on https://kurtdowswell.com/software-development/git-bash-aliases/
[alias]
l = log --pretty=format:"%C(yellow)%h\\ %ad%Cred%d\\ %Creset%s%Cblue\\ [%cn]" --decorate --date=short
lg ='git log --graph --oneline --decorate --all'
d = diff
ds = diff --stat
dc = diff --cached
a = add
ap = add -p
aa = add .
c = commit --verbose
ca = commit -a --verbose
cm = commit -m
cam = commit -a -m
m = commit --amend --verbose
ac = !git add -A && git commit -m
s = status -sb
co = checkout
cob = checkout -b
p = push -u origin HEAD
rh = reset --hard
# removes all the branches that have been merged to the current branch
clean-merged = !git branch --merged | grep -v \"\\*\" | xargs -n 1 git branch -d
# 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/--'"
# list aliases
la = "!git config -l | grep alias | cut -c 7-"