Visual Studio Code에 Git 연동하기

una·2024년 9월 19일

Git

목록 보기
4/5

Git Bash 설치하기 (선택)

1. 원격 저장소 생성

  • https://github.com/ 로그인 후 New repository

  • Repository name 작성 → Add a README file → Create repository

2. Visual Studio Code에 Git 연동

  • $ git config --global user.name "una"

  • $ git config --global user.email "una_j@naver.com"

  • $ git remote add origin https://github.com/[Owner]/[Repository name].git (Repository URL)

  • $ git branch -m master main (GitHub는 main이 메인 브랜치이므로 이름 변경)

  • $ git pull origin main --allow-unrelated-histories (GitHub 저장소에 있는 내용을 로컬 저장소에 반영)

  • Sign in with your browser → 로그인 → Authorize git-ecosystem

  • $ git push -u origin main (원격 저장소에 업로드)
profile
개미는 뚠뚠🌻

0개의 댓글