From 7aa73df80ca745b4de90ed1b6e3fe4a644941884 Mon Sep 17 00:00:00 2001 From: Rui Coelho Date: Fri, 28 Oct 2016 12:59:54 +0100 Subject: [PATCH] Add git alias to diff tags from remote and prune local tags no longer on remote --- modules/git/alias.zsh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/modules/git/alias.zsh b/modules/git/alias.zsh index ffa854dd..246506a5 100644 --- a/modules/git/alias.zsh +++ b/modules/git/alias.zsh @@ -168,6 +168,11 @@ alias gSs='git submodule sync' alias gSu='git submodule foreach git pull origin master' alias gSx='git-submodule-remove' +# Tags (t) +# see http://stackoverflow.com/questions/1841341/remove-local-tags-that-are-no-longer-on-the-remote-repository +alias gtd="diff <(git tag | sort) <( git ls-remote --tags origin | cut -f2 | grep -v '\^' | sed 's#refs/tags/##' | sort)" +alias gtp="git fetch --prune origin +refs/tags/*:refs/tags/*" + # Working Copy (w) alias gws='git status --ignore-submodules=${_git_status_ignore_submodules} --short' alias gwS='git status --ignore-submodules=${_git_status_ignore_submodules}'