LoginSignup
0
0

More than 5 years have passed since last update.

gitのremoteにあるタグをまとめて削除する

Last updated at Posted at 2016-03-19

こんなshellです。
この例の場合は1.0.0は残して、1.0.0.1とかを削除しています。

git ls-remote --tags origin | cut -f 2 | grep -v {} | grep '1.0.0..*' | sed "s/refs\/tags\///g" |  xargs git push --delete origin

ローカルのタグは以下の記事で削除できましたが、remoteのtagが100件を超えていてローカルに落とさずにまとめて削除する方法として書いときました。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0