git rm --cached : GitHub 원격 파일 삭제

임창현·2023년 1월 9일
0

git

목록 보기
3/3
post-thumbnail

원격저장소에 원치않은 파일이 생겼을 경우 삭제방법

  • git rm --cached 옵션을 통해 파일을 삭제 할 수 있음
  • git rm : 로컬과 원격저장소 모두 파일 삭제
  • git rm --cached : 옵션을 사용하면 로컬에는 파일을 남기고 원격저장소에만 해당 파일 삭제

ex)

git rm -r --cached .
git add .
git commit -m "Update .gitignore"

출처 : https://sangmoo.tistory.com/302

profile
Hi there 👋 i'm backend developer

0개의 댓글