Git Setting
1. git 설치하기: https://git-scm.com/
Git
git-scm.com
2. 설치 완료 후 git bash 열기
3. git bash 에서 환경설정
4. 유저이름 설정
git config --global user.name "your_name"
5. 유저이메일 설정
git config --global user.email "your_email"
6. 정보 확인하기
git config --list
Git 과 GitHub 연결
1. 초기화
git init
2. 추가할 파일 더하기
git add .
.(점) 은 모든 파일이라는 뜻, 선택적으로 올리고 싶으면 add뒤에 파일 이름 붙여주면 됨 (예. git add index.html)
3. 상태확인
git status
4. 히스토리 만들기
git commit -m "first commit"
-m 은 메세지의 준말로 뒤에 “” 안에 주고싶은 히스토리 이름을 주면 됨
5. GitHub repository랑 local branch 연결
git remote add origin https://github.com/firstproject.git
6. 연결 확인
git remote -v
'GitHub' 카테고리의 다른 글
| Git Repository 이름 변경방법 (0) | 2024.06.25 |
|---|---|
| Git 사용법 (0) | 2024.06.25 |
| Git 과 GitHub (0) | 2024.06.25 |