Skip to content

Instantly share code, notes, and snippets.

View SuibianP's full-sized avatar
🐾

Hu Jialun SuibianP

🐾
View GitHub Profile
@teerapap
teerapap / git-move-annotated-tag.sh
Created July 14, 2014 04:23
Move annotated tag without retagging
#!/bin/sh
# ---------------------------------------------------------------------------
# git-move-annotated-tag.sh - Move annotated tag without retagging
# Author: Teerapap Changwichukarn <[email protected]>
# Usage: git-move-annotated-tag.sh -h for more information
#
# Manual commands:
# > git cat-file -p ${tag_name} | sed "1 s/^object .*$/object ${full_target_hash}/g" | git hash-object -w --stdin -t tag