summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorlarumbe <larumbe@users.noreply.github.com>2020-05-22 15:56:03 +0100
committerGitHub <noreply@github.com>2020-05-22 16:56:03 +0200
commit77b409d5c200f993256b5ad4679490d9d1db8e24 (patch)
tree939c15b1b8af1dcd826ef4d5ca4bafd96da52336 /plugins
parenta25efd1e311f19baef083ac885467bce2dd2f555 (diff)
downloadzsh-77b409d5c200f993256b5ad4679490d9d1db8e24.tar.gz
zsh-77b409d5c200f993256b5ad4679490d9d1db8e24.tar.bz2
zsh-77b409d5c200f993256b5ad4679490d9d1db8e24.zip
git: add convenience aliases for `git apply` and `git am` (#8563)
Diffstat (limited to 'plugins')
-rw-r--r--plugins/git/README.md6
-rw-r--r--plugins/git/git.plugin.zsh7
2 files changed, 13 insertions, 0 deletions
diff --git a/plugins/git/README.md b/plugins/git/README.md
index 7406dde27..650a4505b 100644
--- a/plugins/git/README.md
+++ b/plugins/git/README.md
@@ -19,6 +19,7 @@ plugins=(... git)
| gau | git add --update |
| gav | git add --verbose |
| gap | git apply |
+| gapt | git apply --3way |
| gb | git branch |
| gba | git branch -a |
| gbd | git branch -d |
@@ -171,6 +172,11 @@ plugins=(... git)
| glum | git pull upstream master |
| gwch | git whatchanged -p --abbrev-commit --pretty=medium |
| gwip | git add -A; git rm $(git ls-files --deleted) 2> /dev/null; git commit --no-verify --no-gpg-sign -m "--wip-- [skip ci]" |
+| gam | git am |
+| gamc | git am --continue |
+| gams | git am --skip |
+| gama | git am --abort |
+| gamscp | git am --show-current-patch |
### Deprecated aliases
diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh
index 32c720c6f..855a746b4 100644
--- a/plugins/git/git.plugin.zsh
+++ b/plugins/git/git.plugin.zsh
@@ -38,6 +38,7 @@ alias gapa='git add --patch'
alias gau='git add --update'
alias gav='git add --verbose'
alias gap='git apply'
+alias gapt='git apply --3way'
alias gb='git branch'
alias gba='git branch -a'
@@ -257,6 +258,12 @@ alias glum='git pull upstream master'
alias gwch='git whatchanged -p --abbrev-commit --pretty=medium'
alias gwip='git add -A; git rm $(git ls-files --deleted) 2> /dev/null; git commit --no-verify --no-gpg-sign -m "--wip-- [skip ci]"'
+alias gam='git am'
+alias gamc='git am --continue'
+alias gams='git am --skip'
+alias gama='git am --abort'
+alias gamscp='git am --show-current-patch'
+
function grename() {
if [[ -z "$1" || -z "$2" ]]; then
echo "Usage: $0 old_branch new_branch"