Git
유용한 Git 명령어 (2)
HYJJ
2022. 6. 13. 11:47
local/remote 에 있는 파일/폴더 삭제
- git rm 파일 이름
- git rm -r 폴더 이름
remote에 있는 파일/폴더 삭제
- git rm --cached 파일 이름
- git rm --cached -r 폴더 이름
git branch 강제 checkout
- git checkout -f 브랜치명
git log에서 나가기
: Q 누르기
remote에 있는 branch 덮어쓰기
git fetch --all
git reset --hard origin/<branch-name>
로컬에 있는 파일 remote 강제로 push 하기
git push origin +branch-name
git pull 취소
git reset --hard ORIG_HEAD