###前提・実現したいこと
PHPで作成したアプリケーションをインターネットに公開したいと思い、下記サイト参考にしながら公開しようと思ったのですが、アプリケーションのデプロイのところでコマンドが認識されず、herokuにログインした後にうまくいきません。
http://www.go-next.co.jp/blog/web/php/8388/
###補足情報(言語/FW/ツール等のバージョンなど)
windows10
PHP
分かる方、ご教示願います。
気になる質問をクリップする
クリップした質問は、後からいつでもMYページで確認できます。
またクリップした質問に回答があった際、通知やメールを受け取ることができます。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
回答2件
0
自己解決
投稿2017/05/02 09:43
総合スコア33
0
src refspec のエラーは git の commit 忘れのエラーです。
commit を忘れていませんか?
投稿2017/05/02 08:35
総合スコア880
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
サイトでは下記のようにcommitコマンドを打つように書いてありますが、エラーが出続けてしまうようです。これは正しいですか?
C:\Users\daino>git commit -m "hello heroku commit"
On branch master
Initial commit
Untracked files:
.bundle/
.config/
.gem/
.vscode/
AppData/
Contacts/
Desktop/
Documents/
Downloads/
Favorites/
Links/
Music/
NTUSER.DAT
NTUSER.DAT{fc35df82-bd0f-11e6-bc69-9e60702fb78f}.TxR.0.regtrans-ms
NTUSER.DAT{fc35df82-bd0f-11e6-bc69-9e60702fb78f}.TxR.1.regtrans-ms
NTUSER.DAT{fc35df82-bd0f-11e6-bc69-9e60702fb78f}.TxR.2.regtrans-ms
NTUSER.DAT{fc35df82-bd0f-11e6-bc69-9e60702fb78f}.TxR.blf
NTUSER.DAT{fc35df83-bd0f-11e6-bc69-9e60702fb78f}.TM.blf
NTUSER.DAT{fc35df83-bd0f-11e6-bc69-9e60702fb78f}.TMContainer00000000000000000001.regtrans-ms
NTUSER.DAT{fc35df83-bd0f-11e6-bc69-9e60702fb78f}.TMContainer00000000000000000002.regtrans-ms
OneDrive/
Pictures/
Saved Games/
Searches/
Videos/
_netrc
ntuser.dat.LOG1
ntuser.dat.LOG2
ntuser.ini
nothing added to commit but untracked files present
C:\Users\daino>git push heroku master
error: src refspec master does not match any.
error: failed to push some refs to 'heroku'
2017/05/02 09:09
git add .
をしていないのではないでしょうか?
2017/05/02 09:17
「git add .」を行い、現状として下記のような状態にあります。
これはcommitをしたことになるのでしょうか?
C:\Users\daino\heroku>git add .
C:\Users\daino\heroku>git commit am "make it better"
error: pathspec 'am' did not match any file(s) known to git.
error: pathspec 'make it better' did not match any file(s) known to git.
C:\Users\daino\heroku>git push heroku master
error: src refspec master does not match any.
error: failed to push some refs to 'https://git.heroku.com/mysterious-island-24770.git'
C:\Users\daino\heroku>git init
Reinitialized existing Git repository in C:/Users/daino/heroku/.git/
C:\Users\daino\heroku>heroku git:remote -a mysterious-island-24770
set git remote heroku to https://git.heroku.com/mysterious-island-24770.git
C:\Users\daino\heroku>echo '<?php phpinfo();'> index.php
ファイル名、ディレクトリ名、またはボリューム ラベルの構文が間違っています。
C:\Users\daino\heroku>git push heroku master
error: src refspec master does not match any.
error: failed to push some refs to 'https://git.heroku.com/mysterious-island-24770.git'
あなたの回答
tips
太字
斜体
打ち消し線
見出し
引用テキストの挿入
コードの挿入
リンクの挿入
リストの挿入
番号リストの挿入
表の挿入
水平線の挿入
プレビュー
質問の解決につながる回答をしましょう。 サンプルコードなど、より具体的な説明があると質問者の理解の助けになります。 また、読む側のことを考えた、分かりやすい文章を心がけましょう。
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。