58
34

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] remoteのtagとbranchの名前が同じ場合の消し方

Last updated at Posted at 2014-11-24

Gitのコマンドメモ

表題どおりの件、リモートリポジトリのタグ名とブランチ名が同名の場合以下の様なエラーが出た

error: dst refspec <tag_name> matches more than one.
error: failed to push some refs to 'git@gitlab:<repo_name>.git'

こんな時は以下のように指定すれば良いらしい

tagを消したい場合
git push origin :refs/tags/<tag_name>
branchを消したい場合
git push origin :refs/heads/<branch_name>

参考

Remove a Git Tag From Github When There is Also a Branch of the Same Name

58
34
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
58
34

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?