🖥

fatal: not a git repository (or any of the parent directories): .git (

に公開

問題

以下のようなエラーが起きる場合

$ git remote add origin https://github.com/user/repository
fatal: not a git repository (or any of the parent directories): .git
$ git status
fatal: not a git repository (or any of the parent directories): .git
$ git branch
fatal: not a git repository (or any of the parent directories): .git

原因

そもそもコマンド実行しているのが git 管理下のディレクトリではないのでは?

対策

  • git init するなどしてディレクトリのgit管理を始める
  • もしくはgit管理下のディレクトリに移動してからコマンド実行する

チャットメンバー募集

何か質問、悩み事、相談などあればLINEオープンチャットもご利用ください。

https://line.me/ti/g2/eEPltQ6Tzh3pYAZV8JXKZqc7PJ6L0rpm573dcQ

Twitter

https://twitter.com/YumaInaura

公開日時

2022-07-21

Discussion