본문 바로가기
CI&CD/Git

[Git] 내 코드 파일 배포 A to Z

by TSpoons 2024. 12. 8.

1. repository 생성

 

 

 

2.

Setting > Developer settings > Personal access tokens > Tokens (classic) > Generate new token

 

repo 관련 접근 허용하고,,

 

 

 

 

3. 해당 폴더로 가서 

git init

- .git 디렉토리가 생성

- 여기에 저장소의 모든 버전 관리 정보가 저장됩

git remote add origin https://[token]@github.com/USERNAME/REPOSITORY.git

 

 

확인

git remote -v

 

# origin  https://github.com/USERNAME/REPOSITORY.git (fetch)
# origin  https://github.com/USERNAME/REPOSITORY.git (push)

 

 

 

4. 기존 repo와 동일하게 맞추기

 

 

5. 

git status

git add .

 

 

 

 

git commit -m "[commit message]"

 

 

 

git push origin main