Git & Github 입문 - Github

WonJu Lee·2021년 7월 9일
0

Git & Github

목록 보기
9/9

내 remote repository 다루기

1. git, my new remote repository 연동

  • 추가
git remote add <remote_repo_name(보통 origin)> <remote_repo address>
  • 삭제
git remote remove <remote_repo_name(보통 origin)>
  • git remote -v 로 확인

my_github -> git

git clone <remote_repository> [<directory_name>]

git -> my_github

  • push는 commit 단위로 이뤄짐
git push <remote_repo_name> <branch_name>

다른 사람의 remote repository 다루기

  • 상대방 remote repository는 직접 수정(push) 못함
  • 따라서 다음과 같은 방법으로 작업을 진행함
    1. 상대 remote repository를 folk
    2. 복사한 repository를 clone 해서 git으로 옮기기
    3. 작업 수행
    4. 작업을 복사한 repository에 push
    5. 복사한 repository에서 상대방 repository로 pull request 요청

git branch이름 변경

  • master branch의 이름을 github format에 맞게 'main'으로 변경
git branch -M main
profile
Don't make excuses

0개의 댓글

관련 채용 정보