-
파일 및 폴더 삭제Github 2023. 1. 16. 15:45반응형
파일 삭제하기
1. 로컬 디렉토리와 git 저장소에서 모두 삭제
$ git rm index.html $ git commit -m "Delete index.html" $ git push origin +master
2. git에서만 삭제
$ git rm --cached index.html $ git commit -m "Delete index.html" $ git push origin +master
폴더 삭제하기
1. 로컬 디렉토리와 git 저장소에서 모두 삭제
$ git rm -rf 폴더명 $ git commit -m "Delete folder" $ git push origin +master
2. git에서만 삭제
$ git rm --cached -r 폴더명 $ git rm --cached -r src/ $ git commit -m "Delete folder" $ git push origin +master
* 참고사이트 :
'Github' 카테고리의 다른 글
git 마지막 커밋 수정 및 푸시 (0) 2024.07.08 git 파일 추가하기 (0) 2023.05.17 git과 형상관리 그리고 git 설치방법 (0) 2023.04.18