aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathias Bynens <mathias@qiwi.be>2015-01-26 15:24:18 +0100
committerMathias Bynens <mathias@qiwi.be>2015-01-26 15:24:18 +0100
commit7d012c593cd5911475528e0332074809dab505f8 (patch)
treed29a267a85e6bcd420e00d66c62b8f2dc6600822
parentda6005aba582d1e0038ae21b375596c191549864 (diff)
downloaddotfiles-7d012c593cd5911475528e0332074809dab505f8.tar.gz
dotfiles-7d012c593cd5911475528e0332074809dab505f8.tar.bz2
dotfiles-7d012c593cd5911475528e0332074809dab505f8.zip
.gitconfig: Add `retag`
-rw-r--r--.gitconfig3
1 files changed, 3 insertions, 0 deletions
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"