mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-03-27 03:14:56 +01:00
Add ggfr command to ask for rebase with master before push --force
This commit is contained in:
parent
e44aa50301
commit
d6a219691e
1 changed files with 10 additions and 0 deletions
|
|
@ -102,6 +102,16 @@ ggf() {
|
|||
[[ "$#" != 1 ]] && local b="$(current_branch)"
|
||||
git push --force origin "${b:=$1}"
|
||||
}
|
||||
ggfr() {
|
||||
local answer
|
||||
vared -p "Do you want to rebase first? Y/N " -c anwser
|
||||
case $anwser in
|
||||
[Yy]* ) git rebase master;;
|
||||
[Nn]* ) :;;
|
||||
* ) echo "Please answer yes or no" && return;;
|
||||
esac
|
||||
ggf
|
||||
}
|
||||
compdef _git ggf=git-checkout
|
||||
ggl() {
|
||||
if [[ "$#" != 0 ]] && [[ "$#" != 1 ]]; then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue