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
'CI&CD > Git' 카테고리의 다른 글
[Git] 브랜치 동기화 이슈 해결하기 (0) | 2025.01.12 |
---|---|
[Git] 크로스 플랫폼 개발 시 줄바꿈 문자(CRLF/LF) 문제 해결 (0) | 2025.01.05 |
[Git] github 최근 커밋 수정사항 반영: git commit --amend (0) | 2024.11.26 |
[Git] window에서 이미 푸시된 커밋을 삭제하는 방법 (2) | 2024.11.08 |
[Git] 원격 저장소와 로컬 저장소의 통일 (0) | 2024.09.26 |