본문 바로가기
CI&CD/Git

[Git] 내 로컬 pc에서 작업 중인 repo를 깃허브 repo로 올리는 절차

by TSpoons 2025. 2. 5.

1. Initialize a Git Repository

 

 

 

2. .gitignore 파일 만들어 보안 및 메모리 정리

 

 

 

3. README.md 작성으로 프로젝트 설명

 

 

4. GitHub CLI(gh) 설치

https://github.com/cli/cli/releases/latest

 

Release GitHub CLI 2.66.1 · cli/cli

Hotfix: gh pr view fails with provided URL This addresses a regression in gh pr view was reported in #10352. This regression was due to a change in v2.66.0 that no longer allowed gh pr subcommands ...

github.com

 

# Windows (관리자 권한으로 실행)
winget install --id GitHub.cli

 

4-1 확인

gh --version

 

5. GitHub 계정 로그인

 

 

6. 새 원격 레포지터리(repo) 생성

gh repo create L-MAP --private  # private 레포지토리
# 또는
gh repo create L-MAP --public   # public 레포지토리

 

7. 로컬 레포지토리(repo)와 연결

git remote add origin https://github.com/[사용자이름]/L-MAP.git

 

7-1 확인

git remote -v

 

 

8. push 절차

 

8-1 git add.

 

8-2 git commit

 

8-3 git push origin [branch_name]

 

G