상세 컨텐츠

본문 제목

Changes not staged for commit: 깃허브 폴더 화살표 현상

프로그래밍

by 2hansoul 2022. 6. 27. 17:56

본문

반응형

 

이런 화살표 표시가 뜨면 폴더 클릭이 안된다 clone 으로 파일을 받아도 아무것도 없다고 나온다 

상위폴더에 .git 이 있는데 하위 폴더들에 .git 또 있어 오류가 생기는거 라고 한다 

[hansol-test@hansol-test html]$ git add .
warning: adding embedded git repository: google/cow
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> google/cow
hint: 
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint: 
hint:   git rm --cached google/cow
hint: 
hint: See "git help submodule" for more information.
warning: adding embedded git repository: google/skysms
warning: adding embedded git repository: google/sqld
warning: adding embedded git repository: google/test20220520
warning: adding embedded git repository: google/testfile
[hansol-test@hansol-test html]$ git add .
[hansol-test@hansol-test html]$ git status
On branch master
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:   cow (untracked content)
        modified:   skysms (modified content, untracked content)
        modified:   sqld (modified content, untracked content)
        modified:   test20220520 (modified content, untracked content)
        modified:   testfile (modified content, untracked content)

git add or  status보면 힌트를 주긴 한다 해당 폴더에 들어가서 .git 을 다 삭제처리해주면 된다

[root@hansol-test test20220520]# rm -rf .git/ 

5개 모두 들어가서 삭제 해준 다음 다시 add 를 하게 되면 정상적으로 작동한다

 

반응형

관련글 더보기

댓글 영역