Git 다운로드
https://git-scm.com/
Git 명령어
1. git
- git config --global core.autocrlf true
- VSCode > 설정 > terminal default profile:Windows
- clear
1.1 Global Git 사용자 설정
- git config --global user.name "아이디"
- git config --global user.email "이메일"
1.2 GitHub repository 생성하기
- 프로젝트명(폴더명) = repository 이름
- 배포용이면 public으로 생성
- repository 이름: 띄어쓰기없이 영문 소문자로
- description 작성
1.3 파일 add
- git init 깃 초기화
- git add . 전체파일 추가
1.4 commit
- git commit -m "커밋내용"
- git remote add origin 리포지토리 링크 (한번만)
- git push -u origin main (처음에만)
- git push origin 브랜치명 (두번째 부터)
1.5 상태확인
- git status
- git log
1.6 파일 수정 후 commit 및 푸시하기
- git status
- git add .
- git commit -m "커밋내용"
- git push origin 브랜치명
1.7 현재 폴더에 clone 하기
- git clone 리포지토리주소 ./
1.8 최신 소스로 업데이트 하기
- git fetch
- git merge origin/main