[PersonalProjects] github와 netlify로 배포하기와 에러 (그림절차)(작성중) 20230110
문제발생
원인 추측
백업파일인 session1 과의 충돌인 것 같다.
일단 netlify.com 에서 해당 사이트를 삭제하도록 한다.
가장 하단의 Danger zone 에 들어가서 Delete this site
해당 나의 지역저장소 가서 충돌되는 해당 session1 파일을 .gitignore에 올려서 해결하면 되는 줄 알았으나
git add .
git status : git add . 한 후 꼭 확인하기
git remote -v : 연결된 원격저장소 위치 확인
warning: adding embedded git repository: Project/personalProject/1th_Project_Momentum
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> Project/personalProject/1th_Project_Momentum
hint:
hint: If you added this path by mistake, you can remove it from the
hint: index with:
hint:
hint: git rm --cached Project/personalProject/1th_Project_Momentum
hint:
hint: See "git help submodule" for more information.
warning: adding embedded git repository: Project/personalProject/2th_Project_ReactTodo
PS C:\Users\LGE\Project\personalProject>
좀 더 알아보아야 할 명령어들
git submodule add <url> Project/personalProject/1th_Project_Momentum
git rm --cached Project/personalProject/1th_Project_Momentum
팀장님께서 이건 그냥 github에 올리는 것이기 때문에 그냥 무시되는 것이고
배포되는 것은 그냥 해당 파일을 삭제해야한다고 말씀해주셨다.
궁금증
[git]
submondule과 branch의 차이가 뭐지?
일단 session1은 다른 파일로 빼놓고 나중에 알아보도록 하자!
참고사이트
Git / GitHub 안내서
[Git] git ignore 특정 파일또는 폴더 제외 or 무시하기
Git: 서브모듈 이해하기 (git submodule)
[git] github에 잘못 올라간 폴더 및 파일 삭제하기