반응형

Git 설치 후 초기 환경설정

git config --global user.name "----name-----"
git config --global user.email "----email----"

option : 정보 확인

git config --list

Github 업로드 

 

1. 초기화 

git init

2. 파일 추가 

# (.) 모든 파일 추가
git add .

# 파일 하나 추가
git add index.html

# option : 상태 확인
git status

3. 히스토리 생성

git commit -m "first commit"

4. branch 생성

git branch -M main

5. Github repository와 로컬 프로젝트 연결

git remote add origin https://github.com/"...Github.../...repositroy.git..."

option : 연결 확인
git remote -v

 

6. Github에 올리기

git push origin main
728x90
반응형

+ Recent posts