9/4 TIL

정민세·2022년 9월 4일
0

git commit

git으로 commit 하는 법을 배웠다.

Github에 Repository 만들기
Github에 파일의 이름을 정하고 생성한다.

commit 할 폴더에서 터미널 열기

git init : 프로젝트 폴더 초기화

git remote add origin "깃허브 레퍼지토리 주소"를 입력
깃허브 레퍼지토리와 폴더를 연결

git status : 현재 폴더 상태 확인

git add . : 폴더 commit 준비

git commit -m "" : -m 뒤에 ""로 메시지를 감싸 작성

git push -u origin main : 레퍼지토리로 push 하여 commit 완료

git branch -M main : 'master branch'에서 'main branch'로 branch 변경

profile
하잇

0개의 댓글