Skip to content

Instantly share code, notes, and snippets.

@wilensky
wilensky / tag.sh
Last active November 9, 2023 15:04
Script recreates an existing Git tag by removing it and creating on the same commit. Useful for checking idempotent triggers or dropping large amount of tags.
#!/usr/bin/env bash
# tag.sh -t [email protected] -dcyv
#
# -d Deletes tags
# -c Creates tag on the same commit
# -y Non-interactive mode (always YES)
# -v Slightly increased verbosity
TAG=''
@wilensky
wilensky / git-reset-author.sh
Created December 23, 2024 12:47
Reset git author for last 3 commits
git rebase --onto HEAD~3 --exec "git commit --amend --reset-author --no-edit" HEAD~3