Git status

1 개요[ | ]

git status
  • 작업 트리 상태를 보여주는 git 명령어

2 실습[ | ]

root@zetawiki:~/workspace/hello# git status
On branch master

Initial commit

nothing to commit (create/copy files and use "git add" to track)
→ git init 직후이므로 아무 것도 없음
  • greet.txt 파일 작성 후 확인
root@zetawiki:~/workspace/hello# echo 'hello world' > greet.txt
root@zetawiki:~/workspace/hello# git status
On branch master

Initial commit

Untracked files:
  (use "git add <file>..." to include in what will be committed)

	greet.txt

nothing added to commit but untracked files present (use "git add" to track)
→ greet.txt는 못보던 녀석인데...
  • greet.txt를 git에 추가 후 확인
root@zetawiki:~/workspace/hello# git add greet.txt
root@zetawiki:~/workspace/hello# git status
On branch master

Initial commit

Changes to be committed:
  (use "git rm --cached <file>..." to unstage)

	new file:   greet.txt

3 같이 보기[ | ]

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}