본문 바로가기

Study/Today I Learn

[TIL] 2019.04.04 - Git 기본

git? github?

git : DVCS(분산 버전 관리 시스템)
github : git repogitory 를 인터넷에에서 제공하는 단순한 호스팅 서비스

git 의 대표적인 저장소 4가지

  • working tree (작업 디렉토리)
  • stage
  • local repository
  • remote repository

git repository 만들기

  1. git init 명령어
  2. git clone [remote repository address]
    하면 .git 폴더가 생김

git add

working tree 에 있는 파일을 stage 에 올리는 작업

git commit

stage에 변경사항을 local repository 에 옮기는 작업

git patch

remote repository와 local repository 동기화

git pull

working tree, stage, local repository 동기화

git checkout

HEAD의 위치를 바꿈

git merge

두 커밋을 합침

git rebase

해당 브렌치의 commit 를 통째로 이어 붙임

오늘 중요한 내용

  1. 커밋을 하면 무조건 남는다.
  2. 브렌치는 단순 참조이다.

'Study > Today I Learn' 카테고리의 다른 글

[TIL] 2019.04.05  (0) 2019.04.05
[TIL] 2019.04.04 - Pull Request  (0) 2019.04.05
[TIL] 2019.04.03 - Computer Science  (0) 2019.04.03
[TIL] 2019.04.02  (0) 2019.04.02
[TIL] 2019.04.01  (0) 2019.04.01