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でpushができないときの対処法

Last updated at Posted at 2018-08-12

ごめんなさい。絶対にmasterってブランチがあるみたいで、そこにpushしないとダメみたいです。
なので、僕のやり方じゃ根本的な解決はできないっぽいです。
結局分からないままでした。

以下何か参考になる知識があれば使ってください。

pushしようとしたらこういうエラーが出る。
やったことは
git push origin masterって書いて送ったこと。

error: src refspec master does not match any.
error: failed to push some refs to 

とりあえずgit branchで、今あるブランチを見てみる。

$ git branch
  radio
* test

radioとtestのブランチはあるけど、「master」のブランチがないからこんなエラーが出たらしい。
だから、git branchして、アスタリスクマークのついてるやつの名前をoriginの後に書けばちゃんとpushされます。
(僕の場合なら、git push origin testでpushできる)

超初歩的だからそんなエラーの対象法は書いてませんでした。

みんながんばれ

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?