git bash status

Cheddaryeon·2023년 5월 15일

"git status"

파일의 상태를 알 수 있는 명령어

$ git status
On branch master
No commits yet
nothing to commit (create/copy files and use "git add" to track)

master 브랜치로 체크아웃 되어 있으며, commit 내역이 없음

파일 생성 직후 status를 확인해 보면

$ git status
On branch master
No commits yet
Untracked files:
        demofile.txt

새로 만든 파일에 add 또는 commit을 하지 않았기 때문에 untracked 상태

# tracked vs untracked

tracked : git이 현재 파일을 추적 및 관리하는 상태
untracked : git이 현재 파일을 추적 및 관리하지 않는 상태

git add 명령으로 파일 추가/수정

$ git status
On branch master
No commits yet
Changes to be committed:
        new file:   demofile.txt

committed 되었으며, demofile.txt은 git의 관리 대상인 tracked 상태

profile
study frontend

0개의 댓글