git init을 해줘야 한다.1. Git을 연습할 작업공간 만들기
(나의 경우 Documents/dev_ws/git_ws)
dev_ws % mkdir git_ws
dev_ws % cd git_ws
2. test_project 폴더를 만들고 git init을 통해 저장소로 만들기
git_ws % mkdir test_project
git_ws % cd test_project
test_project % git init
🚨주의🚨 repository로 만들 파일로 이동 후
git init
3. ls -all 로 .git 파일이 생성되었는지 확인
test_project % ls -all
1. github에서 remote repository 생성
Remote Repository URL 형태
https://github.com/<organization>/<project_name>.git (조직) https://github.com/<user_name>/<project_name>.git (개인)
2. github에서 Token 발행
Token(토큰) : 토큰 값과 세팅 값을 참고하여 인증을 자동으로 처리
3. git clone 로 파일 생성
git_ws % git clone https://<token>@github.com/<user_name>/<project_name>.git
4. 잘 생성 됐는지 확인
git_ws % cd test_project2
test_project2 % ls
README.md
test_project2 % ls -all
total 16
drwxr-xr-x 5 jayce staff 160 6 17 15:22 .
drwxr-xr-x 4 jayce staff 128 6 17 15:22 ..
drwxr-xr-x 12 jayce staff 384 6 17 15:22 .git
-rw-r--r-- 1 jayce staff 3139 6 17 15:22 .gitignore
-rw-r--r-- 1 jayce staff 15 6 17 15:22 README.md