Search

Git CLI Quick Start

1. git 설치

# ubuntu sudo apt-get install git-core # cetos or redhat yum install git-core # mac brew install git-core
Bash
복사

2. Github 개인 정보 등록

git config --global user.name "본인 계정 입력" git config --global user.email "본인 메일 주소 입력" git config --global color.ui "auto"
Bash
복사

3. 작업 폴더 생성

sudo mkdir /works cd /works
Bash
복사

4. github 저장소 복제

git clone https://github.com/parkjangwon/jtl.git
Bash
복사

5. 원격 저장소 등록

git remote add origin https://github.com/parkjangwon/parkjangwon.github.io git fetch origin
Bash
복사

6. 변경된 모든 파일 추가 (커밋 전에 필수 실행)

git add -A # 보통 프로젝트 루트 디렉토리에서 . 쓰는게 편함..! git add . # 아래의 명령어를 입력후 엔터 치고 변경목록이 보이면 Ctrl+o 그리고 엔터 그리고 Ctrl+x 종료한다. git commit
Bash
복사

7. 커밋 메세지를 입력 (하지 않으면 안됨)

git commit -m '메세지입력'
Bash
복사

8. 저장소에 올리기 (계정과 암호 물어보면 입력)

git push
Bash
복사

9. 저장소 업데이트 (내려받기)

git pull
Bash
복사

10. git 상태 확인

git status
Bash
복사
Home
GitHub
Instagrm