-
Notifications
You must be signed in to change notification settings - Fork 0
/
git-aliases
55 lines (52 loc) · 1.95 KB
/
git-aliases
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
s() {
git status -sb "$@"
return 0
}
alias d='gd $argv'
alias ga='git add -A'
alias gap='ga -p'
alias gau='git add -u'
alias gbr='git branch -v'
alias gc!='git commit -v'
alias gcam='gca --amend'
alias gcdeploy='gc --allow-empty -m "Deploy"'
alias gch='git cherry-pick'
alias gclean='git remote prune origin; git gc'
alias gcm='git commit -v --amend'
alias gcm!='git commit -v --amend --no-edit'
alias gco='git checkout'
alias gcop='gco -p'
alias gdo='gd origin/$(git_current_branch)..'
alias gf='git fetch'
alias gg='git grep'
alias glog='git log --date-order --pretty="format:%C(yellow)%h%Cblue%d%Creset %s %C(dim white) %an, %ar%Creset"'
alias gl='glog --graph'
alias gla='gl --all'
alias glo='gl origin/$(git_current_branch)..'
alias glr='glog --reverse'
alias gm='git merge --no-ff'
alias gmf='git merge --ff-only'
alias gmfthis='gmf origin/$(git_current_branch)'
alias gp='git push'
alias gpghpages='export PREVIOUS_BRANCH=$(git_current_branch) ; gco -B gh-pages ; gpthis -f ; gco $PREVIOUS_BRANCH; gbr -D gh-pages'
alias gpstaging='export PREVIOUS_BRANCH=$(git_current_branch) ; gco staging ; gm $PREVIOUS_BRANCH ; gpthis ; gco $PREVIOUS_BRANCH'
alias gpqa='export PREVIOUS_BRANCH=$(git_current_branch) ; gco qa ; gm $PREVIOUS_BRANCH ; gpthis ; gco $PREVIOUS_BRANCH'
alias gpforce='gpthis --force-with-lease'
alias gpthis='gp origin $(git_current_branch)'
alias gpthis!='gp --set-upstream origin $(git_current_branch)'
alias gr='git reset'
alias grb='git rebase -p'
alias grba='git rebase --abort'
alias grbmaster='gco master ; gup ; gco - ; grb master'
alias grbthis='grb origin/$(git_current_branch)'
alias grbc='git rebase --continue'
alias grbi='git rebase -i'
alias grh='git reset --hard'
alias grl='git reflog'
alias grp='gr --patch'
alias grsh='git reset --soft HEAD~'
alias grv='git remote -v'
alias gst='git stash'
alias gstp='git stash pop'
alias gup='git smart-pull'
alias gupthis='export PREVIOUS_BRANCH=$(git_current_branch) ; gco master ; gup ; gbr -d $PREVIOUS_BRANCH'