feat: git_rebase_to_origin, git_rm_tag_of_remote, git_log_history
This commit is contained in:
parent
616b5238a5
commit
2fb628a68a
17
zsh/git.zsh
17
zsh/git.zsh
@ -6,3 +6,20 @@ alias gfR='gf origin master; gwR origin/master'
|
||||
alias gpb='git push origin "$(git-branch-current 2> /dev/null):build"'
|
||||
alias gitUserRallet="git config user.name rallets;git config user.email rallet@rallets.com"
|
||||
alias gfs="gs;gfr;gsp"
|
||||
git_rebase_to_origin() {
|
||||
BRANCH=${1:-master}
|
||||
DIRTY=false
|
||||
git fetch origin
|
||||
[[ -n $(git status -s) ]] && DIRTY=true
|
||||
$DIRTY && echo "Git is dirty"
|
||||
$DIRTY && (git add .; git stash)
|
||||
git rebase origin/$BRANCH
|
||||
$DIRTY && (git stash pop; git reset HEAD)
|
||||
}
|
||||
git_rm_tag_of_remote() {
|
||||
TAG=$1
|
||||
REMOTE=${2:-origin}
|
||||
git tag -d $TAG
|
||||
git push --delete $REMOTE $TAG
|
||||
}
|
||||
git_log_history='git log -p --'
|
||||
|
Loading…
Reference in New Issue
Block a user