Week 3 Oct 18 TIL

신동윤·2021년 10월 18일
0

TDI

목록 보기
4/5

오늘은 Git의 활용법에 대해서 배웠다. 안타깝게도 내 페어링 파트너는 탈주했으므로 페어간 remote repo를 연결하는 연습을 할 수는 없었다.

개념 요약 및 단축어 정리


핵심:

1. 다른 remote repository에서 fork해서 나의 remote repo로 가져옴.

  1. 내 컴퓨터에 clone 해서 작업할 수 있게 한다.
    -> git clone
  2. 내 컴퓨터에서 작업한 파일들을 git이 관리하고 있는 상태로 만든다. (staging area)
    -> git add
  3. Tracked file들은 내 remote repo에 commit할 수 있다.
    -> git commit -m <- leaving messages;
  4. 내 remote repo에 push 커맨드를 이용해 작업한 파일 업로드.
    -> git push 'origin' 'master'
  5. Pull request to notify others about the changes I made.

<협업할 때>

  1. 페어의 repository를 등록. git remote add mypair

  2. 내 remote repo도 등록 해주자. git remote add origin master
    -git remote -v로 잘 연결되었는지 체크

  3. git init 으로 현재 파일을 git의 관리하에 두기(?)

  4. 전송할 파일 git add <filename.format>으로 staging area로 올려주고

  5. git commit -m "" 으로 커밋 및 코멘트 남기고

  6. git push origin master

  7. git pull pair master
    -> 여기까지 내가 작업한 파일을 레포에 올리고 페어에게 pr하는 과정.

  8. git push origin master -> 페어의 파일을 내 git hub에 저장?

profile
응애 프로그래머(?)

0개의 댓글