【Git】’origin’ does not appear to be a git repository【初めてのバージョン管理】


みなさんこんにちは!
カミ@god48_です。
今回は初めてのGit管理について紹介していきます。
Git管理を行わずにプログラムを進めて「push」しようとすると、次のエラーが起きます。
MacBook-Pro:appbiz User名$ git push origin -u ブランチ名
fatal: 'origin’ 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.
「origin does not appear to be a git repository」のエラーが出ている時は「Gitでバージョン管理」できていないので、解決しないといけません。

それでは順に見ていきましょう。
'origin’ does not appear to be a git repository
エラー文
’origin’ does not appear to be a git repository
翻訳文
オリジンはgitリポジトリではないようです
Could not read from remote repository
Could not read from remote repository
翻訳文
リモートリポジトリから読み取ることができませんでした

翻訳で理解ができれば、全部はしなくてもいいですよ。
スポンサードサーチ
’origin’ does not appear to be a git repositoryの解決方法
’origin’ does not appear to be a git repositoryの解決方法は翻訳通りに「リポジトリがない」のでリポジトリを設定します。
git remote add origin “リポジトリ名"
リポジトリ名を取得方法

リポジトリはGitの「プロジェクト」ページから「クローン」を選択すれば「リポジトリ」を取得することができます。
スポンサードサーチ
まとめ
- エラー内容はリポジトリがない
- Gitのプロジェクトからリポジトリをコピー
- git remote add origin “リポジトリ名"でリポジトリを設定
実装やエラーが解決できない場合
プログラミングの実装やエラーでどうしてもわからない場合はメンターに相談するのが一番です。
考えている、見えている範囲が狭くなり、解決から遠くに行って何時間も、何日も経っていることなんてよくある話です。
そういう時は聞ける先輩や、メンターに相談することが大事です。
僕にも相談可能なので気軽に相談してください。

Twitterからの連絡だと確実ですよ。
オンラインスクールやプログラミングスクールといったプログラミングを学べる方法もあるので、そちらもぜひ活用してもいいと思います。
Web開発で分からない時
オンライン完結型スクール DMM WEBCAMP PROアプリ開発で分からない時
転職保証付きプログラミングスクール DMM WEBCAMP COMMITプログラミングについて分からない時
RUNTEQ(ランテック)
僕への個人でもメンターでも、スクールでもお好きな方を活用ください。