Git - 백업하기 (Vs Code+Git Bash)

https://github.com/

 

GitHub: Let’s build from here

GitHub is where over 100 million developers shape the future of software, together. Contribute to the open source community, manage your Git repositories, review code like a pro, track bugs and fea...

github.com

 

1. GitHub에서 백업 저장소를 생성합니다.

 

2. HTTPS 저장소 주소를 복사합니다.

 

3. git init 을 선언한 vs code에서 소스제어 창을 열고 원격(Remote) 추가를 실행합니다.

 

4. 복사한 주소를 붙여넣으세요.

 

 

5. 저장소의 별명을 설정하세요. ex) origin(중앙 저장소)

 

6. 저장소에 push 합니다.

git branch -M main
git push -u origin main

 

7. gitHub에서 F5(새로고침)을 진행해서 push파일,폴더와 message를 확인합니다.

 

 

8. 이후 수정된 파일을 다시 push할 때는 다음과 같은 명령어를 사용합니다.

git push

 

9. 협업하며 진행된 파일은 pull로 받을 수 있습니다. 

* 별개의 새폴더를 생성 후 탐색기 재연결 후 연습해보세요.

git init
//원격 저장소 remote 연결 - origin 별명 설정 후
git branch -M main
git pull origin main

 

  Comments,     Trackbacks