작업 디렉토리의 파일이름 변경

작업 디렉토리에 있는 파일의 이름을 변경 할 때는 git mv 명령어를 사용한다.

git mv script.js common.js
git status

명령어를 실행하면 tracked 되어 staging 영역에 올라가며 commit 대기 상태가 된다. commit을 하면 파일 이름이 변경된다.

git commit -m 'rename script.js'

results matching ""

    No results matching ""