-
[git] 로컬 저장소에서 변경한 내역을 원격 저장소에 반영하기공부/etc 2022. 1. 10. 02:00
상황:
로컬 파일 [15729_방탈출.c]를 원격 저장소에 push한 후,
로컬 저장소에서 [15729_방탈출.c]를 [15729.c]로 수정한 후 [15729.c]를 원격 저장소에 push함
원격 저장소에는 아래와 같이 2개의 파일이 존재하고
로컬 저장소에는 15729.c 파일만 존재하는 상황에서
원격 저장소에서도 15729_방탈출.c 파일 삭제 내역을 반영하고 싶음
git status 명령어를 통해 deleted된 15729_방탈출.c 파일이 commit이 되지 않은 것을 확인
git commit -am "15729_방탈출.c 삭제" 를 통해 commit 작업 수행 후
git push origin master 명령어를 수행하면 됨!
아래와 같이 원격 저장소에 로컬 저장소 변경 내역이 반영된 것을 확인할 수 있다
'공부 > etc' 카테고리의 다른 글
[코테 준비] reminders (0) 2023.10.07 Adafruit ESP32 Feather V2 CH2102F 사용해보기 (1) - 환경설정부터 예제 코드 실행까지 (0) 2022.06.22 [라즈베리파이] USB 마이크를 이용해서 음성데이터를 녹음하기 (0) 2021.11.08 [git] warning: LF will be replaced by CRLF (0) 2021.11.06 라즈베리파이로 적외선 신호를 보내보자 - 2 (0) 2021.08.27