티스토리 뷰
application.properties 파일과 같이 중요한 정보 파일과 빌드 파일을 gitignore를 통해 제외목록에 올렸는데도
Sourcetree에서 커밋 대상파일로 떡하니 올라와있다.
이럴 때 캐시를 삭제하고 다시 커밋하면 된다.
* 전체 캐시 삭제
git rm -r --cached .
사진과 같이 올라가있던 캐시들이 삭제된다.
* 지정된 파일 캐시 삭제
git rm -r --cached 파일명
위와 같이 제외할 파일만 캐시를 지워도 된다.
git add .
git commit -m "clear"
다시 파일들을 commit 하면 gitignore에 작성했던 이미 올려진 application.properties를 포함한 제외 파일들이 변경된 것이 보인다.
git push
원격 저장소를 업데이트한다.
공지사항
최근에 올라온 글
최근에 달린 댓글
- Total
- Today
- Yesterday
링크
TAG
- mybatis
- 메모리 삭제
- mysql oracle
- linux 포트중복
- aws git
- aws build
- aws git pull
- Mapper namespcae
- spring boot sh파일
- Mybatis vs JPA
- Spring Group
- aws
- gitignore 적용안됨
- vue project
- git gitignore
- colima docker
- Linux caches
- docker context
- vue npm
- Spring Artifact
- colima
- docker 명령어
- SQL Mapper
- Docker
- nginx
- docker --context
- aws spring boot
- gitignore 적용오류
- oracle db
- 리눅스 메모리 캐시
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |
글 보관함