부트캠프 기록/Section1

[Git]기초 / 6일차 기록

bbangduck 2022. 9. 1. 20:03
  1. Git 필요성 
    • 버전 관리
    • 백업
    • 협업
  2. git 과 github 
    • git은 로컬 버전관리 시스템
    • github 는 원격 저장소
  3. Git 3가지 영역 및 상태(Unmodified, Modified, Staged)  
    • local repository <==(clone)== origin repo <==(fork)== other repo
    • unstaged ==(add) ==> staged ==(commit)==>local repository ==(push)==> origin repo ==(pull request)==> other repo
  4. 주요 명령어 
    • git push <origin> <branch> // 원격 저장소 origin의 branch 에 변경사항 업로드 
    • git log //commit 기록 확인
    • git status
    • git restore, git reset HEAD^
    • git remote -v
    • git remote add
    • git commit -m
  5. 협업하는 workflow
    • git init : 디렉토리를 git repo로 변환하거나 새로운 repo를 초기화
    • git remote add origin <원격 repo 주소> : local repo와 remote repo연결 
    • git remote add pair (이름) <상대방 원격 repo 주소> : local repo와 상대방 remote repo연결
    • git remote -v : 현재 local repo와 연결된 모든 remote repo목록 확인
    • git pull <shortname> <가져올 내용에 해당하는 branch> 
    • add => commit => push
     

페어분과 실습