手が震えたらBARに行こう

駄文を吐き出して、今日もなんとか、元気に生きていこうと思います。twitterアカウントは、@tabunmuri255です。よろしくです。

git で”fatal: does not appear to be a git repository”という表示がされて、push できなくなって、焦った話

git で、突然使えなくなって焦った

{14-06-24 21:11}MBA:~/webRoot/test_app@fix_task pm1401% git push origin/fix_task

こうやって書いて、本当は、リモートブランチにプッシュしたかったんだけれども、以下の感じで怒られる。

fatal: 'origin/fix_task' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

その際、こんな凄いサイトのお世話にもなった
gitのエラー解決方法 - Shut the fuck up and write some code
GitLabでリポジトリを作成後 push しようとすると does not appear to be a git repository - サーバ管理メモ

で、いろいろやった結果、ついに原因がわかった。
typoだった(爆)ワロエナイ

結果、こう書いたら動いた

{14-06-24 21:11}MBA:~/webRoot/test_app@fix_task pm1401% git push origin fix_task

違いはここ

正){14-06-24 21:11}MBA:~/webRoot/test_app@fix_task pm1401% git push origin fix_task
誤){14-06-24 21:11}MBA:~/webRoot/test_app@fix_task pm1401% git push origin/fix_task

このスラッシュがあるかないか、によって、激しく悩まされていた。
気をつけようと思った(小並感)