Github

DEV_HOYA·2023년 10월 12일
0

Project

목록 보기
2/2
post-thumbnail

📌 Github

⭐ 개념

  • 분산 버전 관리 툴인 깃(Git)를 사용하는 프로젝트를 지원하는 웹호스팅 서비스

⭐ 명령어

💡 초기설정

git config --global user.name "사용자 이름"
git config --global user.email "사용자 이메일"

💡 커밋 순서(초기)

1. 저장소로 이동
cd desktop/project

2. 초기화(git repo)
git init

3. 스테이징
git add *

4. 스테이지 => 지역저장소
git commit -m "커밋메시지"

5. branch 변경
git branch -M main
-- github의 메인 브랜치가 main이라 변경해준다. git bash의 경우 디폴트 브랜치가 master이다.

6. 원격저장소, 지역저장소 연결
git remote add origin https://github.com/tubus1130/~~.git

7. 지역저장소 => 원격저장소
git push -u origin main

💡 커밋 순서

cd desktop/file
git add *
git commit -m "메시지명"
git push

💡 파일 내려받기

cd desktop/file
-- 둘 중 선택
git pull : 변경사항만
git clone : 전체 다

0개의 댓글