2013-04-29 20:45:08 +08:00
|
|
|
# Makes git auto completion faster favouring for local completions
|
|
|
|
__git_files () {
|
|
|
|
_wanted files expl 'local files' _files
|
|
|
|
}
|
2017-03-21 11:49:16 +08:00
|
|
|
alias gfR='gf origin master; gwR origin/master'
|
2017-09-04 17:15:34 +08:00
|
|
|
alias gpb='git push origin "$(git-branch-current 2> /dev/null):build"'
|
2018-04-12 14:17:45 +08:00
|
|
|
alias gitUserRallet="git config user.name rallets;git config user.email rallet@rallets.com"
|
2019-05-05 19:30:20 +08:00
|
|
|
alias gfs="gs;gfr;gsp"
|
2022-03-14 09:36:30 +08:00
|
|
|
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 --'
|