728x90
문제 원인
yml파일을 git에서 추적하지 않기 위해 .gitignore에 적용했지만 계속 추적하는 원인이 git 캐시라고 한다.
해결 방법
git 캐시를 지워주면 된다.
`git rm -r --cached .` 하면 모든 파일의 캐시가 지워지고 다시 모든 파일을 커밋할 수도 있지만
`git rm -r --cached {yml파일 경로}` 이렇게하면 yml 파일만 캐시에서 삭제할 수 있고 모든 파일을 다시 커밋하지 않아도 된다.
1. `git rm -r --cached {yml파일 경로}`
2. `git add {yml파일경로}`
3. `git commit -m "Delete git cached"`
위 과정을 거치면 yml파일을 git 추적에서 제외할 수 있다.
728x90
'트러블슈팅' 카테고리의 다른 글
ERROR: failed to solve: eclipse-temurin:17-jdk-alpine: failed to resolve source metadata for docker.io/library/eclipse-temurin:17-jdk-alpine: no match for platform in manifest: not found (0) | 2024.09.06 |
---|---|
zsh: command not found: docker (0) | 2024.09.05 |
S3에서 이미지 가져올 때 AccessDenied 발생(2) (0) | 2024.09.05 |
S3에 올린 이미지 Access Denied(1) (0) | 2024.09.04 |
AWS Lambda CORS 설정 (0) | 2024.08.26 |