7654b16b3963844e5079a8935eb93f108c52f273
- Author
- Marc Cornellà <marc.cornella@live.com>
- Committer
- Marc Cornellà <marc.cornella@live.com>
- Date
Message
Diff
This diff is truncated to protect this page.
1diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh
2index 01c29e14ef4b613877dc0c9e091a0cca31e47db5..0cee136c2d72f235e5e618a71187ba0d6163174d 100644
3--- a/plugins/git/git.plugin.zsh
4+++ b/plugins/git/git.plugin.zsh
5@@ -81,62 +81,73 @@ alias gd='git diff'
6 alias gdca='git diff --cached'
7 alias gdct='git describe --tags `git rev-list --tags --max-count=1`'
8 alias gdt='git diff-tree --no-commit-id --name-only -r'
9+alias gdw='git diff --word-diff'
10+
11 gdv() { git diff -w "$@" | view - }
12 compdef _git gdv=git-diff
13-alias gdw='git diff --word-diff'
14
15 alias gf='git fetch'
16 alias gfa='git fetch --all --prune'
17+alias gfo='git fetch origin'
18+
19 function gfg() { git ls-files | grep $@ }
20 compdef _grep gfg
21-alias gfo='git fetch origin'
22
23 alias gg='git gui citool'
24 alias gga='git gui citool --amend'
25+
26 ggf() {
27-[[ "$#" != 1 ]] && local b="$(git_current_branch)"
28-git push --force origin "${b:=$1}"
29+ [[ "$#" != 1 ]] && local b="$(git_current_branch)"
30+ git push --force origin "${b:=$1}"
31 }
32 compdef _git ggf=git-checkout
33+
34 ggl() {
35-if [[ "$#" != 0 ]] && [[ "$#" != 1 ]]; then
36-git pull origin "${*}"
37-else
38-[[ "$#" == 0 ]] && local b="$(git_current_branch)"
39-git pull origin "${b:=$1}"
40-fi
41+ if [[ "$#" != 0 ]] && [[ "$#" != 1 ]]; then
42+ git pull origin "${*}"
43+ else
44+ [[ "$#" == 0 ]] && local b="$(git_current_branch)"
45+ git pull origin "${b:=$1}"
46+ fi
47 }
48 compdef _git ggl=git-checkout
49-alias ggpull='git pull origin $(git_current_branch)'
50-compdef _git ggpull=git-checkout
51+
52 ggp() {
53-if [[ "$#" != 0 ]] && [[ "$#" != 1 ]]; then
54-git push origin "${*}"
55-else
56-[[ "$#" == 0 ]] && local b="$(git_current_branch)"
57-git push origin "${b:=$1}"
58-fi
59+ if [[ "$#" != 0 ]] && [[ "$#" != 1 ]]; then
60+ git push origin "${*}"
61+ else
62+ [[ "$#" == 0 ]] && local b="$(git_current_branch)"
63+ git push origin "${b:=$1}"
64+ fi
65 }
66 compdef _git ggp=git-checkout
67-alias ggpush='git push origin $(git_current_branch)'
68-compdef _git ggpush=git-checkout
69+
70 ggpnp() {
71-if [[ "$#" == 0 ]]; then
72-ggl && ggp
73-else
74-ggl "${*}" && ggp "${*}"
75-fi
76+ if [[ "$#" == 0 ]]; then
77+ ggl && ggp
78+ else
79+ ggl "${*}" && ggp "${*}"
80+ fi
81 }
82 compdef _git ggpnp=git-checkout
83-alias ggsup='git branch --set-upstream-to=origin/$(git_current_branch)'
84+
85 ggu() {
86-[[ "$#" != 1 ]] && local b="$(git_current_branch)"
87-git pull --rebase origin "${b:=$1}"
88+ [[ "$#" != 1 ]] && local b="$(git_current_branch)"
89+ git pull --rebase origin "${b:=$1}"
90 }
91 compdef _git ggu=git-checkout
92+
93 alias ggpur='ggu'
94 compdef _git ggpur=git-checkout
95
96+alias ggpull='git pull origin $(git_current_branch)'
97+compdef _git ggpull=git-checkout
98+
99+alias ggpush='git push origin $(git_current_branch)'
100+compdef _git ggpush=git-checkout
101+
102+alias ggsup='git branch --set-upstream-to=origin/$(git_current_branch)'
103+
104 alias gignore='git update-index --assume-unchanged'