plugin-git icon indicating copy to clipboard operation
plugin-git copied to clipboard

Rebasing on origin master would be nice

Open torhovland opened this issue 3 years ago • 4 comments

git fetch origin (__git.default_branch); and git rebase origin/(__git.default_branch)

torhovland avatar Jan 13 '22 07:01 torhovland

Does sound like a good idea. If already in https://github.com/robbyrussell/oh-my-zsh/wiki/Plugin:git we should attempt to match their alias name

jhillyerd avatar Jan 13 '22 18:01 jhillyerd

Good point. The last part is grbom there. For the first part, I suppose the user will do gfo (__git.default_branch) or simply gfo, gfa or gf.

I see there is a discussion on https://github.com/ohmyzsh/ohmyzsh/pull/8988

This one would be even nicer, as it does everything in one command, but it hasn't been merged: https://github.com/ohmyzsh/ohmyzsh/pull/10261

torhovland avatar Jan 14 '22 07:01 torhovland

Could you get this with gpr origin master while on feature branch? alias here

Update: Yep, just like you mentioned is happening in https://github.com/ohmyzsh/ohmyzsh/pull/10261

jmeridth avatar May 12 '22 17:05 jmeridth

Those got merged it seems,

alias gupom='git pull --rebase origin $(git_main_branch)'
alias gupomi='git pull --rebase=interactive origin $(git_main_branch)'

we can do the same I think

jhillyerd avatar May 27 '22 18:05 jhillyerd

I believe #91 resolved this.

jhillyerd avatar Feb 11 '23 20:02 jhillyerd