본문 바로가기
TIP

터미널로 gitHub 커밋하기

by GREEN나무 2025. 2. 12.
728x90

GitHub에서 새로운 레포지토리 생성
Git 저장소 초기화:
git init

GitHub 원격 저장소 연결
git remote add origin https://github.com/사용자명/my-first-repo.git

확인
git remote -v

모든파일 git커밋
git add .

커밋메시지 작성 
git commit -m "Initial commit"

코드 푸시
브런치이동
git branch -M main
코드올리기
git push -u origin main


변경 사항 커밋 후 푸시
git add .
git commit -m "Update index.js"
git push origin main