: 파일의 변화를 시간에 따라 기록했다가 특정 시점의 버전으로 복원할 수 있도록 관리해주는 시스템
: 개발자의 코드를 효율적으로 관리하기 위한 스냅샷(특정 시점의 백업 복사본) 기반의 분산형 버전 관리 시스템
: Git Repository를 관리할 수 있는 클라우드 기반 서비스
명령어 | 설명 |
---|---|
git init | git저장소 초기화(파일들을 git으로 관리 시작) |
git status | git으로 관리되고 있는 파일 상태 확인 |
git add | 파일을 Work Space에서 Staging area로 이동 |
git commit -m 메시지 | Staging area에 있는 파일을 Local Repository에 저장하고, 파일의 버전 기록 |
git log | commit 내역 확인 |
git remote -v | Local Repository와 연결된 Remote Repository 내역 출력 |
git remote add 저장소이름 URL | Local Repository와 Remote Repository 연결 |
git push | 파일을 Remote Repository로 업로드 |
git clone | Remote Repository의 코드를 Local Repository에 복사 |
1) 다른 Remote Repository를 Fork해서 내 Remote Repository로 가져온다.
2) 내 컴퓨터에서 작업하기 위해 Local Repository clone한다.
3) 작업이 끝난 파일을 내 컴퓨터의 Work space에서 Staging area로 add한다.
4) Staging area의 파일을 Local Repository로 commit한다.
5) commit한 파일을 Remote Repository로 push한다.
6) 원래 Remote Repository에 pull request를 보내 내가 수정한 코드를 업로드한다.
1) 내 컴퓨터의 디렉토리를 init으로 Git Repository로 변환한다.
2) git remote add로 Local Repository를 내 Remote Repository와 연결한다.
3) git remote add로 Local Repository를 Pair의 Remote Repository와 연결한다.
4) Pair의 작업이 끝난 후 git pull을 통해 Pair의 Remote Repository의 작업 내용을 받아온다.
5) 만약 나의 작업 내용과 Pair의 작업 내용에 충돌이 일어나면 충돌된 부분을 확인한 후 수정한다.
6) 수정 완료된 파일을 add를 사용해 Staging area에 추가한다.
7) 그리고 commit하면 Merge commit은 자동으로 메시지가 생성된다.