mirror of
https://github.com/frebib/dotfiles.git
synced 2024-06-14 12:57:23 +00:00
aliases: git: gfrb/gfrbi defaults to defbranch
Much like how `git pull` will default to the remote tracking branch if called with no arguments, gfrb and gfrbi will fetch and rebase from the "default" branch according to git defbranch. Signed-off-by: Joe Groocock <me@frebib.net>
This commit is contained in:
parent
a7af23bfbb
commit
73131b086f
6
aliases
6
aliases
@ -138,9 +138,9 @@ alias grba="grb --abort"
|
|||||||
alias grbc="grb --continue"
|
alias grbc="grb --continue"
|
||||||
alias grbsk="grb --skip"
|
alias grbsk="grb --skip"
|
||||||
alias grbsh="grb --show-current"
|
alias grbsh="grb --show-current"
|
||||||
alias grbom="git rebase \"origin/\$(git defbranch)\""
|
alias grbom="git rebase \"origin/\$(git defbranch origin)\""
|
||||||
gfrb() { remote="${1%/*}"; git fetch "$remote" && git rebase "$@"; }
|
gfrb() { ref="${1:-origin/$(git defbranch origin)}"; remote="${ref%%/*}"; git fetch "$remote" && git rebase "$ref" "${@:2}"; }
|
||||||
gfrbi() { remote="${1%/*}"; git fetch "$remote" && git rebase -i "$@"; }
|
gfrbi() { ref="${1:-origin/$(git defbranch origin)}"; remote="${ref%%/*}"; git fetch "$remote" && git rebase -i "$ref" "${@:2}"; }
|
||||||
|
|
||||||
alias gam="git am"
|
alias gam="git am"
|
||||||
alias gama="git am --abort"
|
alias gama="git am --abort"
|
||||||
|
Loading…
Reference in New Issue
Block a user