0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

gitで不要なタグ、ブランチを一括削除

Posted at

タグの削除

  • 2.0.2beta3とかのタグを削除したい場合
for tag in `git tag`; do if [[ ${tag} =~ "^.*beta[0-9]*$" ]] ; then git tag -d ${tag}; fi done

ブランチの削除

  • feature_xxxxみたいなブランチを削除したい
for branch in `git branch`; do if [[ ${branch} =~ "^feature_.*$" ]]; then git branch -D ${branch}; fi done
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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?