LoginSignup
74
56

More than 3 years have passed since last update.

gitをpushする際にエラー発生(error: src refspec ブランチ名 does not match any)

Posted at

エラー詳細

任意のブランチをpushする際に、下記のようなエラーが発生しました。

$ git push origin ブランチ名
error: src refspec ブランチ名 does not match any

git branchを実行すると、下記のような表示がでます。

$ git status
develop
master
*(HEAD detached at origin/49792)

解決策

git push origin HEAD:pushしたいブランチ名

参考

making a git push from a detached head

74
56
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
74
56