[Git] git add . 에러

Windows PowerShell

Copyright (C) Microsoft Corporation. All rights reserved.

새로운 크로스 플랫폼 PowerShell 사용 https://aka.ms/pscore6

PS C:\study_1228> git init

Initialized empty Git repository in C:/study_1228/.git/

PS C:\study_1228> git add .

error: '2020_studyReact/' does not have a commit checked out

fatal: adding files failed

Initialized empty Git repository in C:/study_1228/.git/

PS C:\study_1228> git status

        .babelrc

        package.json

        src/

        type_react/

nothing added to commit but untracked files present (use "git add" to track)

error: '2020_studyReact/' does not have a commit checked out

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

Initialized empty Git repository in C:/study_1228/.git/

PS C:\study_1228> git push origin --delete feature/sth

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.

PS C:\study_1228> git checkout master 

error: pathspec 'master' did not match any file(s) known to git

PS C:\study_1228> git reset

Reinitialized existing Git repository in C:/study_1228/.git/

PS C:\study_1228> git status

No commits yet

Untracked files:

  (use "git add <file>..." to include in what will be committed)

        .babelrc

        .gitignore

        2020_studyReact/

        nodemon.json

        package-lock.json

        package.json

        src/

        type_react/

nothing added to commit but untracked files present (use "git add" to track)

error: '2020_studyReact/' does not have a commit checked out

PS C:\study_1228> git add --ignore-errors .

error: '2020_studyReact/' does not have a commit checked out

warning: adding embedded git repository: type_react

hint: You've added another git repository inside your current repository.

hint: Clones of the outer repository will not contain the contents of

hint: the embedded repository and will not know how to obtain it.

hint: If you meant to add a submodule, use:

hint: 

hint:   git submodule add <url> type_react

hint: 

hint: If you added this path by mistake, you can remove it from the

hint: index with:

hint: 

hint:   git rm --cached type_react

hint: 

hint: See "git help submodule" for more information.

PS C:\study_1228> git add README.md

fatal: pathspec 'README.md' did not match any files

PS C:\study_1228> git status

On branch master

No commits yet

Changes to be committed:

  (use "git rm --cached <file>..." to unstage)

        new file:   .babelrc

        new file:   .gitignore

        new file:   nodemon.json

        new file:   package-lock.json

        new file:   package.json

        new file:   src/api/User/join/join.graphql

        new file:   src/api/User/join/join.js

        new file:   src/api/User/login/login.graphql

        new file:   src/api/User/login/login.js

        new file:   src/api/User/me/me.graphql

        new file:   src/api/User/model.graphql

        new file:   src/passport.js

        new file:   src/schema.js

        new file:   src/sequelize/User.js

        new file:   src/sequelize/index.js

        new file:   src/server.js

        new file:   type_react

 

Changes not staged for commit:

  (use "git add <file>..." to update what will be committed)

  (use "git restore <file>..." to discard changes in working directory)

  (commit or discard the untracked or modified content in submodules)

        modified:   type_react (modified content, untracked content)

 

Untracked files:

  (use "git add <file>..." to include in what will be committed)

        2020_studyReact/

 

PS C:\study_1228> git commit -2

[master (root-commit) 5f7acb1] 2

 create mode 100644 .gitignore

 create mode 100644 nodemon.json

 create mode 100644 package.json

 create mode 100644 src/api/User/join/join.graphql

 create mode 100644 src/api/User/join/join.js

 create mode 100644 src/api/User/login/login.graphql

 create mode 100644 src/api/User/login/login.js

 create mode 100644 src/api/User/me/me.graphql

 create mode 100644 src/api/User/me/me.js

 create mode 100644 src/api/User/model.graphql

 create mode 100644 src/passport.js

 create mode 100644 src/sequelize/index.js

 create mode 100644 src/server.js

 create mode 160000 type_react

PS C:\study_1228> git remote add origin https://github.com/ericabyss/2020_studyReact.git

PS C:\study_1228> git remote -v

origin  https://github.com/ericabyss/2020_studyReact.git (fetch)

origin  https://github.com/ericabyss/2020_studyReact.git (push)

PS C:\study_1228> git push origin master

info: please complete authentication in your browser...

Enumerating objects: 26, done.

Counting objects: 100% (26/26), done.

Delta compression using up to 8 threads

Compressing objects: 100% (21/21), done.

Writing objects: 100% (26/26), 82.26 KiB | 3.92 MiB/s, done.

Total 26 (delta 0), reused 0 (delta 0), pack-reused 0

To https://github.com/ericabyss/2020_studyReact.git

 * [new branch]      master -> master