diff --git a/tasks/usersettings.yml b/tasks/usersettings.yml index 4789795..ed01d40 100644 --- a/tasks/usersettings.yml +++ b/tasks/usersettings.yml @@ -113,7 +113,7 @@ - { src: "{{ role_path }}/templates/htoprc.j2", dest: "{{ ansible_user_dir }}/.config/htop/htoprc", - force: no, + force: false, } - name: Usersettings - Set global gitconfig when: usersetup_gitconfig == true diff --git a/templates/_zshrc.j2 b/templates/_zshrc.j2 index e866e9c..b5edc62 100644 --- a/templates/_zshrc.j2 +++ b/templates/_zshrc.j2 @@ -107,6 +107,19 @@ alias doch='sudo sh -c "$(fc -n -l -- -1)"' alias git-reset-pull='git fetch && git reset --hard origin/$(git rev-parse --abbrev-ref HEAD)' alias git-force-push='git push origin $(git rev-parse --abbrev-ref HEAD) --force-with-lease' +git_retag() { + # delete specified tag, add to current HEAD again and push + remote="origin" + if [ "$#" -ge "2" ]; then + remote=$2; + fi + if [ "$#" -ge "1" ]; then + echo "git tag -d $1 && git push $remote :$1 && git tag $1 && git push $remote $1" + else + echo "ERROR: Please provide a tag name and optionally a remote name (default = 'origin')" + fi +} + # mpv alias mpv="mpv --autofit=70%"