1 개요[ | ]
- git init
- 빈 Git 저장소를 생성하거나 기존 저장소를 초기화하는 명령어
2 실습[ | ]
Console
Copy
root@zetawiki:~# mkdir -p workspace/hello
root@zetawiki:~# cd workspace/hello/
root@zetawiki:~/workspace/hello# git init
Initialized empty Git repository in /root/workspace/hello/.git/
3 확인[ | ]
Console
Copy
root@zetawiki:~/workspace/hello# tree -aF
.
└── .git/
├── branches/
├── config
├── description
├── HEAD
├── hooks/
│ ├── applypatch-msg.sample*
│ ├── commit-msg.sample*
│ ├── post-update.sample*
│ ├── pre-applypatch.sample*
│ ├── pre-commit.sample*
│ ├── prepare-commit-msg.sample*
│ ├── pre-push.sample*
│ ├── pre-rebase.sample*
│ └── update.sample*
├── info/
│ └── exclude
├── objects/
│ ├── info/
│ └── pack/
└── refs/
├── heads/
└── tags/
10 directories, 13 files
- → 맨뒤에 /가 붙은 것은 폴더, 그렇지 않은 것은 파일
Console
Copy
root@zetawiki:~/workspace/hello# git status
On branch master
Initial commit
nothing to commit (create/copy files and use "git add" to track)
Console
Copy
root@zetawiki:~/workspace/hello# git show
fatal: bad default revision 'HEAD'
root@zetawiki:~/workspace/hello# git log
fatal: bad default revision 'HEAD'
4 같이 보기[ | ]
편집자 Jmnote Jmnote bot 211.246.68.178
로그인하시면 댓글을 쓸 수 있습니다.