리포지토리 만들기

Git 입문

George Boorman

Curriculum Manager, DataCamp

테크 분야 정신건강 프로젝트

두 파일(funding, report), 하나의 data 디렉터리, 그리고 dot-git 디렉터리가 있는 Git 리포지토리 이미지

Git 입문

Git 리포지토리란?

  • Git 리포지토리 = 파일과 하위 디렉터리가 있는 디렉터리

두 파일(funding, report)과 data 디렉터리, dot-git 디렉터리가 주석된 Git 리포지토리 이미지

Git 입문

Git 리포지토리란?

  • Git 리포지토리 = 파일·하위 디렉터리 + Git 저장소가 있는 디렉터리

두 파일(funding, report), data 디렉터리, Git 저장소로 표시된 dot-git 디렉터리가 주석된 Git 리포지토리 이미지

.git은 편집하지 마십시오!

Git 입문

리포지토리의 이점

  • 버전을 체계적으로 추적
  • 이전 버전으로 복구
  • 시점별 버전 비교
  • 동료와 협업

동료들의 브레인스토밍

Git 입문

새 리포지토리 생성

git init mental-health-workspace
cd mental-health-workspace
git status
On branch main

No commits yet

nothing to commit (create/copy files and use "git add" to track)
Git 입문

프로젝트를 리포지토리로 변환

  • 기존 디렉터리를 Git 리포지토리로 변환
git init
Initialized empty Git repository in /home/repl/mental-health-workspace/.git/
Git 입문

무엇이 추적되나요?

git status
On branch main

No commits yet

Untracked files:
    (use "git add <file>..." to include what will be committed)

        data/
        report.md

nothing added to commit but untracked files present (use "git add" to track)
  • Git이 추적되지 않은 변경 파일을 감지했습니다!
Git 입문

중첩 리포지토리

  • 다른 Git 리포지토리 안에 새 Git 리포지토리를 만들지 마십시오
    • 이를 중첩 리포지토리라고 합니다

 

  • .git 디렉터리가 두 개 생깁니다

  • 어느 .git을 업데이트해야 할까요?

 

혼란스러운 개

Git 입문

연습해 봅시다!

Git 입문

Preparing Video For Download...