Notice
Recent Posts
Link
Tags
- 자바
- 1차원 배열
- sql
- PYTHON
- string
- hibernate
- 문자열
- jpa
- 데이터베이스
- 프로그래머스
- spring
- @transactional
- mysql
- java
- select
- DI
- Docker
- join
- 스프링부트
- 스프링
- static
- spring boot
- ORM
- SSL
- Django
- spring security 6
- springboot
- spring mvc
- nginx
- AWS
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Archives
개발하는 자몽
[Git] .gitignore 적용 안되는 경우 본문
인텔리제이에서 작업하던 프로젝트를 github에 올리려고 .gitignore를 수정하니 적용이 안 되는 경우가 있었다. 이런 일이 요즘 자주 있어서 해결방법을 정리하려고 한다.
찾아보니 git의 캐시 문제라고 한다. 터미널을 열어서 캐시를 삭제하고 다시 커밋하면 된다.
git rm -r --cached . // git 캐시 삭제
git add .
git commit -m "clear git cache, source files" //commit 메시지는 원하는 대로 작성
git push
참고
[Git] .gitignore가 적용이 안될때
.gitignore가 적용이 안될때 .gitignore에 커밋에서 제거할 파일이나 폴더를 넣어놨음에도 불구하고 가끔 커밋이 되는 경우가 있다. 이경우 아래 명령어들을 입력해주면 된다. git rm -r --cached . 명령
computer-science-student.tistory.com
'Git' 카테고리의 다른 글
[Git] 사라진 커밋(commit) 복원하기 (0) | 2023.04.16 |
---|---|
[Git Error] fatal: It seems that there is already a rebase-merge directory, ... (0) | 2023.04.15 |
[Git] remote에 push한 파일 삭제 (0) | 2022.11.01 |
IntelliJ Git 연동 (0) | 2022.09.14 |
[GitHub] 깃허브 저장소 public/private 변경 (0) | 2022.04.05 |
Comments