소스 코드를 새 폴더나 저장소로 이동할 때 유용한 명령 - sync files
발행: (2026년 2월 26일 오후 05:08 GMT+9)
1 분 소요
원문: Dev.to
Source: Dev.to
새로운 폴더나 저장소로 소스 코드를 이동할 때 유용한 명령
파일을 업데이트하고, 생성하고, 삭제할 수 있습니다.
rsync -av --exclude={'node_modules','.git','logs'} --exclude-from='.gitignore' ./ /path/to/destination
설명
rsync: 한 폴더에서 다른 폴더로 파일을 동기화합니다--exclude={'node_modules','.git','logs'}: 특정 폴더를 제외합니다--exclude-from='.gitignore':.gitignore에 나열된 파일을 제외합니다./: 현재 폴더/path/to/destination: 대상 폴더