From 7d012c593cd5911475528e0332074809dab505f8 Mon Sep 17 00:00:00 2001 From: Mathias Bynens Date: Mon, 26 Jan 2015 15:24:18 +0100 Subject: .gitconfig: Add `retag` --- .gitconfig | 3 +++ 1 file changed, 3 insertions(+) (limited to '.gitconfig') diff --git a/.gitconfig b/.gitconfig index a1fdffd..2fba740 100644 --- a/.gitconfig +++ b/.gitconfig @@ -38,6 +38,9 @@ # Interactive rebase with the given number of latest commits reb = "!r() { git rebase -i HEAD~$1; }; r" + # Remove the old tag with this name and tag the latest commit with it. + retag = "!r() { git tag -d $1 && git push origin :refs/tags/$1 && git tag $1; }; r" + # Find branches containing commit fb = "!f() { git branch -a --contains $1; }; f" -- cgit v1.2.3