forked from sebdah/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gitaliases
79 lines (63 loc) · 1.51 KB
/
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
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
72
73
74
75
76
77
78
79
#
# Git aliases
#
alias g 'git'
# Add
alias ga 'git add'
# Branch
alias gb 'git branch'
alias gbs 'git branches'
alias gbc 'git checkout -b'
alias gbd 'git branch -d'
alias gbD 'git branch -D'
# Commit
alias gc 'git commit --verbose'
alias gca 'git commit --amend --reuse-message=HEAD'
alias gce 'git commit --allow-empty'
alias gcs 'git show'
alias gcp 'git cherry-pick'
alias gcr 'git revert'
# Checkout
alias gcl 'git clone'
alias gco 'git checkout'
# Pull request
alias gpr 'hub pull-request'
# Fetch / pull
alias gf 'git fetch'
alias gL 'git pull'
# Grep
alias gg 'git grep'
alias ggi 'git grep -i'
# Log
alias gl "git log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
# Merge
alias gm 'git merge'
# Push
alias gp 'git push'
alias gpf 'git push --force-with-lease'
alias gpff 'git push --force'
# Rebase
alias gr 'git rebase'
alias gra 'git rebase --abort'
alias grc 'git rebase --continue'
alias gri 'git rebase --interactive'
alias grs 'git rebase --skip'
# Rev parse
alias grps 'git rev-parse --short HEAD'
# Working copy
alias gwc 'git clean -n'
alias gwC 'git clean -f -d'
alias gwd 'git diff'
alias gwr 'git reset --soft HEAD'
alias gwR 'git reset --hard HEAD'
# Stash
alias gs 'git stash'
alias gsp 'git stash pop'
# Status
alias gst 'git status'
# Submodules
alias gS 'git submodule'
alias gSa 'git submodule add'
alias gSi 'git submodule init'
alias gSs 'git submodule status'
alias gSu 'git submodule update --recursive --init'