본문 바로가기
GitHub

[mac] Vscode Github 연동하기

by MoonGa 2023. 2. 6.

1. 깃허브 repositorie 생성하기:

  • Add a README file 체크하기!!

2. vscode에서 repositorie와 같은 이름의 프로젝트 생성하기:

  • 프로젝트 생성 후, 해당 폴더 열기
  • github에서 생성한 repositorie의 Code눌러서 HTTPS주소 복사하기
  • 깃에 파일 업로드 전, 로컬 저장소와 깃을 연결시킨 후에 pull하기:
    • $ git init
    • $ git branch -M main
    • $ git remote add origin 'git 주소'
    • $ git pull origin main

3. 깃에 파일 업로드하기:

  • $ git commit -m 'commit 메시지'
  • // $ git branch -M main
  • $ git pull origin main
  • $ git push origin main.    //커밋메시지 적고, push만해도됨. --> 안될경우 pull하고 Push하기

※업로드 시, 주의사항!!!!!

  • secret key 지우기!!!!!!

'GitHub' 카테고리의 다른 글

github 명령어  (0) 2024.02.01