浏览代码

feat(git): add `gpsupf` alias (#11268)

Taehyun Hwang 1 年之前
父节点
当前提交
39525e5ec3
共有 2 个文件被更改,包括 3 次插入1 次删除
  1. 1 0
      plugins/git/README.md
  2. 2 1
      plugins/git/git.plugin.zsh

+ 1 - 0
plugins/git/README.md

@@ -89,6 +89,7 @@ plugins=(... git)
 | ggsup                | git branch --set-upstream-to=origin/$(git_current_branch)                                                                                                                                |
 | ggu                  | git pull --rebase origin $(current_branch)                                                                                                                                               |
 | gpsup                | git push --set-upstream origin $(git_current_branch)                                                                                                                                     |
+| gpsupf                | git push --set-upstream origin $(git_current_branch) --force-with-lease                                                                                                                                     |
 | ghh                  | git help                                                                                                                                                                                 |
 | gignore              | git update-index --assume-unchanged                                                                                                                                                      |
 | gignored             | git ls-files -v \| grep "^[[:lower:]]"                                                                                                                                                   |

+ 2 - 1
plugins/git/git.plugin.zsh

@@ -199,6 +199,7 @@ alias ggpush='git push origin "$(git_current_branch)"'
 
 alias ggsup='git branch --set-upstream-to=origin/$(git_current_branch)'
 alias gpsup='git push --set-upstream origin $(git_current_branch)'
+alias gpsupf='git push --set-upstream origin $(git_current_branch) --force-with-lease'
 
 alias ghh='git help'
 
@@ -341,4 +342,4 @@ function grename() {
   fi
 }
 
-unset git_version
+unset git_version