116
108

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.

エラー:fatal: Not a git repository (or any of the parent directories): .git 対処方法

Last updated at Posted at 2019-06-12

git cloneした後、git branchを確認しているところに、下記のエラーが出た!!
原因は初期セットアップの不備です!

エラー:fatal: Not a git repository (or any of the parent directories): .git

エラー解消のために、

まず、ユーザーの登録。

$ git config --global user.name "xxxx"
$ git config --global user.email "xxxxxx@gmail.com"

そして、gitの初期化。

$ git init
Initialized empty Git repository in 作業ディレクトリ/.git/

上記のように表示できたら、git branchで確認してみる。

$ git branch
* master

無事に出た〜

GitHub 初心者による GitHub 入門(1)〜 git のインストールとセットアップ・リポジトリの作成・ clone 〜 を 参考した!

116
108
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
116
108

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?