제로베이스 Git3(Local Repositary)

ningbbang·2023년 5월 21일
0

Zerobase DS13

목록 보기
36/48

1. 구성

  • Working Directory(작업공간) : 실제 소스파일, 생성한 파일
  • Index(준비영역, Stage) : git add한 파일들이 존재
  • HEAD : 최종 확정본, git commit한 파일들이 존재

[working] ->(add)-> [index] ->(commit)-> [head]

2. 생성

mkdir
git init #git으로 관리하기

3. 파일생성

touch text.txt

4. Remote에 반영

git add test.txt
git status

5. Index add

git commit -m 'memo' test.txt
git status

6. Remote Repository 생성 및 Commit

Github 사이트에서 Repository 생성

git remote add origin 'remort repository url'
git remote -v
git push origin <branch>

7. Remote Repository 변경내용 반영

git pull origin <branch>
profile
HR Anaylist!

0개의 댓글