From b0204f78394d84771436a7717aafee6cad140319 Mon Sep 17 00:00:00 2001 From: whisperity Date: Thu, 15 Aug 2024 17:53:03 +0200 Subject: [PATCH] feat(git): add `gmff`, `gprum(i)`, `grbum` aliases to work with `upstream` remotes (#11428) --- plugins/git/README.md | 4 ++++ plugins/git/git.plugin.zsh | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/plugins/git/README.md b/plugins/git/README.md index 592840f87..d3a927f23 100644 --- a/plugins/git/README.md +++ b/plugins/git/README.md @@ -114,6 +114,7 @@ plugins=(... git) | `gma` | `git merge --abort` | | `gmc` | `git merge --continue` | | `gms` | `git merge --squash` | +| `gmff` | `git merge --ff-only` | | `gmom` | `git merge origin/$(git_main_branch)` | | `gmum` | `git merge upstream/$(git_main_branch)` | | `gmtl` | `git mergetool --no-prompt` | @@ -125,6 +126,8 @@ plugins=(... git) | `gprav` | `git pull --rebase --autostash -v` | | `gprom` | `git pull --rebase origin $(git_main_branch)` | | `gpromi` | `git pull --rebase=interactive origin $(git_main_branch)` | +| `gprum` | `git pull --rebase upstream $(git_main_branch)` | +| `gprumi` | `git pull --rebase=interactive upstream $(git_main_branch)` | | `ggpull` | `git pull origin "$(git_current_branch)"` | | `ggl` | `git pull origin $(current_branch)` | | `gluc` | `git pull upstream $(git_current_branch)` | @@ -156,6 +159,7 @@ plugins=(... git) | `grbd` | `git rebase $(git_develop_branch)` | | `grbm` | `git rebase $(git_main_branch)` | | `grbom` | `git rebase origin/$(git_main_branch)` | +| `grbum` | `git rebase upstream/$(git_main_branch)` | | `grf` | `git reflog` | | `gr` | `git remote` | | `grv` | `git remote --verbose` | diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index 99f640e88..8436fb440 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -255,6 +255,7 @@ alias gm='git merge' alias gma='git merge --abort' alias gmc='git merge --continue' alias gms="git merge --squash" +alias gmff="git merge --ff-only" alias gmom='git merge origin/$(git_main_branch)' alias gmum='git merge upstream/$(git_main_branch)' alias gmtl='git mergetool --no-prompt' @@ -274,6 +275,8 @@ compdef _git ggu=git-checkout alias gprom='git pull --rebase origin $(git_main_branch)' alias gpromi='git pull --rebase=interactive origin $(git_main_branch)' +alias gprum='git pull --rebase upstream $(git_main_branch)' +alias gprumi='git pull --rebase=interactive upstream $(git_main_branch)' alias ggpull='git pull origin "$(git_current_branch)"' function ggl() { @@ -340,6 +343,7 @@ alias grbs='git rebase --skip' alias grbd='git rebase $(git_develop_branch)' alias grbm='git rebase $(git_main_branch)' alias grbom='git rebase origin/$(git_main_branch)' +alias grbum='git rebase upstream/$(git_main_branch)' alias grf='git reflog' alias gr='git remote' alias grv='git remote --verbose'