1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-12-18 10:22:00 +00:00

feat(git): add gmff, gprum(i), grbum aliases to work with upstream remotes (#11428)

This commit is contained in:
whisperity 2024-08-15 17:53:03 +02:00 committed by GitHub
parent f30df6c855
commit b0204f7839
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 8 additions and 0 deletions

View file

@ -114,6 +114,7 @@ plugins=(... git)
| `gma` | `git merge --abort` | | `gma` | `git merge --abort` |
| `gmc` | `git merge --continue` | | `gmc` | `git merge --continue` |
| `gms` | `git merge --squash` | | `gms` | `git merge --squash` |
| `gmff` | `git merge --ff-only` |
| `gmom` | `git merge origin/$(git_main_branch)` | | `gmom` | `git merge origin/$(git_main_branch)` |
| `gmum` | `git merge upstream/$(git_main_branch)` | | `gmum` | `git merge upstream/$(git_main_branch)` |
| `gmtl` | `git mergetool --no-prompt` | | `gmtl` | `git mergetool --no-prompt` |
@ -125,6 +126,8 @@ plugins=(... git)
| `gprav` | `git pull --rebase --autostash -v` | | `gprav` | `git pull --rebase --autostash -v` |
| `gprom` | `git pull --rebase origin $(git_main_branch)` | | `gprom` | `git pull --rebase origin $(git_main_branch)` |
| `gpromi` | `git pull --rebase=interactive 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)"` | | `ggpull` | `git pull origin "$(git_current_branch)"` |
| `ggl` | `git pull origin $(current_branch)` | | `ggl` | `git pull origin $(current_branch)` |
| `gluc` | `git pull upstream $(git_current_branch)` | | `gluc` | `git pull upstream $(git_current_branch)` |
@ -156,6 +159,7 @@ plugins=(... git)
| `grbd` | `git rebase $(git_develop_branch)` | | `grbd` | `git rebase $(git_develop_branch)` |
| `grbm` | `git rebase $(git_main_branch)` | | `grbm` | `git rebase $(git_main_branch)` |
| `grbom` | `git rebase origin/$(git_main_branch)` | | `grbom` | `git rebase origin/$(git_main_branch)` |
| `grbum` | `git rebase upstream/$(git_main_branch)` |
| `grf` | `git reflog` | | `grf` | `git reflog` |
| `gr` | `git remote` | | `gr` | `git remote` |
| `grv` | `git remote --verbose` | | `grv` | `git remote --verbose` |

View file

@ -255,6 +255,7 @@ alias gm='git merge'
alias gma='git merge --abort' alias gma='git merge --abort'
alias gmc='git merge --continue' alias gmc='git merge --continue'
alias gms="git merge --squash" alias gms="git merge --squash"
alias gmff="git merge --ff-only"
alias gmom='git merge origin/$(git_main_branch)' alias gmom='git merge origin/$(git_main_branch)'
alias gmum='git merge upstream/$(git_main_branch)' alias gmum='git merge upstream/$(git_main_branch)'
alias gmtl='git mergetool --no-prompt' 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 gprom='git pull --rebase origin $(git_main_branch)'
alias gpromi='git pull --rebase=interactive 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)"' alias ggpull='git pull origin "$(git_current_branch)"'
function ggl() { function ggl() {
@ -340,6 +343,7 @@ alias grbs='git rebase --skip'
alias grbd='git rebase $(git_develop_branch)' alias grbd='git rebase $(git_develop_branch)'
alias grbm='git rebase $(git_main_branch)' alias grbm='git rebase $(git_main_branch)'
alias grbom='git rebase origin/$(git_main_branch)' alias grbom='git rebase origin/$(git_main_branch)'
alias grbum='git rebase upstream/$(git_main_branch)'
alias grf='git reflog' alias grf='git reflog'
alias gr='git remote' alias gr='git remote'
alias grv='git remote --verbose' alias grv='git remote --verbose'