- Git
버전관리 시스템의 종류이다.
✔️ 버전관리
여러 파일을 하나의 버전으로 묶어 관리하는 것을 의미한다.
- 버전관리 시스템의 종류
1) 클라이언트 - 서버 모델
하나의 중앙 서버로 여러 클라이언트들의 각자 필요한 것만 가져와서 작업을 하고 다시 중앙 서버로 통합하는 방식이다,
예시로 CVS, SVN 이 있다.
2) 분산모델
하나의 중앙 서버가 존재하지만 여러 클라이언트들은 각자의 컴퓨터 저장소에 전체 사본을 가지고 작업하는 방식이다.
예시로 Git이 있다.
- Git 다운
https://git-scm.com/download/win -> 64bit
Git - Downloading Package
Download for Windows Click here to download the latest (2.38.1) 32-bit version of Git for Windows. This is the most recent maintained build. It was released 19 days ago, on 2022-10-18. Other Git for Windows downloads Standalone Installer 32-bit Git for Win
git-scm.com
- Git 버전확인
git bash 실행 -> git --version
git version 2.38.1.windows.1
- 윈도우용 터미널 프로그램
Cmder | Console Emulator
Total portability Carry it with you on a USB stick or in the Cloud, so your settings, aliases and history can go anywhere you go. You will not see that ugly Windows prompt ever again.
cmder.app
- 커맨드창 명령어
ls(dir) : 현재 디렉토리 내의 파일 및 디렉토리를 표시한다.
cd : 다른 디렉토리로 이동
cls (ctrl + l) : 화면 클리어
- Git 명령어
Git - Reference
Reference
git-scm.com
1) 프로젝트 디렉토리 내에 로컬 저장소 생성
git init
✔️ .git 숨김 폴더 생성 확인
ls -al
2) config 명령어 사용
명령어 | 의미 |
git config user.name | 현재 설정되어 있는 이름 확인 |
git config --global user.name "이름" | 이름 설정하기 local : 내 컴퓨터에서만 사용가능 global : 전체 서버 system |
git config --global user.email "이메일" | 이메일 설정 |
git config user.name git config user.email |
설정 확인 |
git config --global init.defaultBranch main | 기본 브랜치 변경 |
3) 파일 상태 확인
git status 명령어
4) 진행 히스토리 확인
git log
5) 파일 선택하기
git add 파일명
6) 하나의 버전으로 만들기
git commit -m "올릴 파일명"
7) 파일을 한꺼번에 선택 -> stage에 올림
git add .
8) 선택된 여러 파일을 하나의 버전으로 만들기
git commit -m "남길메세지 작성"
'국비 > Git' 카테고리의 다른 글
DAY 02 : Github (0) | 2022.11.20 |
---|