개발(Web)/VCS

[Git] fatal: pathspec '파일명.확장자명' did not match any files.

shinyelee 2020. 7. 22. 00:49

fatal: pathspec '파일명.확장자명' did not match any files.

참고한 영상. 순조롭게 따라가다가 11분 20초경부터 문제가 생김

문제의 에러. document.txt가 어떠한 파일과도 일치하지 않는다고 함
근데 또 해당 경로로 들어가보면 document.txt가 멀쩡하게 살아있음


깃(Git), 깃허브(GitHub) 재설치

다음날 원인도 찾을겸 학원PC에도 깃과 깃허브를 설치함
중간에 오타를 쳐서 add부터 다시 치긴 했는데, 여튼 순서대로 착착 완료함
학원PC에서는 한 큐에 제대로 작동해서 더 의문이다


깃 푸시(Git push) 실패

document.txt 파일을 삭제한 후
hello.html 파일을 새로 만듦
엥 된다?
된다!
안된다...


방법 1. 파일 삭제

fatal: pathspec '파일명.확장자명' did not match any files. → 기존 파일을 삭제해 해결

error: failed to push some refs to 'https://github.com/이름/레포지토리.git → 아래 글에서 해결

 

깃 에러(Git error) error: failed to push some refs to 'https://github.com/이름/레포지토리.git

깃 에러(Git error) fatal: pathspec '파일명.확장자명' did not match any files. Ⅰ. fatal: pathspec '파일명.확장자명' did not match any files. * 임의의 텍스트파일을 만든 후 프로젝트로 추가하려..

shinye0213.tistory.com

반응형