git 기초 -2

Young Han·2021년 4월 15일

기술블로그

목록 보기
3/7
post-thumbnail

이번에는 git을 활용하여 다같이 함께 작업을 할때의 과정에 대해서 알아보자.

git을 활용하여 다같이 작업

전체적인 과정은 다음과 같다.

init

기존 디렉토리를 git Repository로 변경해 주는 명령어.
즉, 나의 데스크탑에 있는 디렉토리를 git 의 관리하에 변환을 시켜주기 위해 git Repository로 변경해주는 명령어 이다.
git init

Remote add origin

나의 remote Repository와 연결.
즉, local Repository를 다른사람도 원격으로 수정을 할 수 있게 remote Repository로 연결해주는 명령어 이다.
git remote add origin(Repository 주소)

Remote add pair

pair remote Repository와 연결
즉, 협업을 같이 할 사람의 remote Repository와 연결을 하여 함께 공유를 할 수 있는 명령어 이다.
git remote add pair(Repository 주소)

git remote -v

현재 local repository와 연결된 remote repository 목록 확인

Pull

remote Repository의 디렉토리를 가져오기
즉, 같이 협업한 페어가 올려논 remote Repository 받아와 합병할 수 있는 명령어.
git pull (shortname)(master)

이로써 git을 활용하여 다같이 작업을 할 수 있는 과정을 알아보았다.

0개의 댓글