CS

Git Hub Organization 계정 만들기

개발기록 2024. 8. 30. 20:07

본 포스팅은 Git Hub Organization 계정을 만들기 위해서 작성한 포스팅이다.

 

Git Hub Organization?


GitHub에서 제공하는 서비스중 하나로 팀단위 개발시 원본 소스코드의 저장을 개인 Github가 아닌 팀단위 Gihub로 사용하기 위해 조직(공용) GitHub 계정을 가르킨다.

 

Git Hub Organization을 만들면 어떻게 형상관리가 될까?


Git Hub Organization로 팀단위 형상관리시 여러가지 방법의 소스코드 관리가 있겠지만, 필자는 아래 그림과 같은 형식의 형상관리 설계를 하여 진행 하였다.

출처 : https://learn.microsoft.com/ko-kr/contribute/content/get-started-setup-local

위 그림과 같이 Upstream이 Organization Repository가 되는것이고, Origin이 개인 Remote Git Repository가 되는것이며 마지막으로 Local이 Clone한 내 Pc에 저장된 Local Repository가 되는것이다.

 

위 상태에서 수정된 소스코드 반영시에는 Local Repository에서 commit 내용을 Origin Repository로 Push를 1차적으로 하여 반영을 하고, 이후 Pull Request로 Upstream Repository에 반영을 하여 최대로 코드간의 Conflict를 방지할수 있다.

 

그럼 만든느 방법은?


1.Github에 로그인한 상태에서 아래 그림과 같이 New organization버튼을 누른다.

출처:https://www.lainyzine.com/ko/article/how-to-create-an-organization-for-collaboration-on-github/

 

2. 조직에 적용할 Plan을 적용한다.

출처:https://www.lainyzine.com/ko/article/how-to-create-an-organization-for-collaboration-on-github/

 

3. 이후 조직이름과 조직의 대표 이메일 작성을 한다.

출처:https://www.lainyzine.com/ko/article/how-to-create-an-organization-for-collaboration-on-github/

 

4.  검색창에 GitHub ID를 입력하면 초대할 사용자를 검색하고 추가한고 이후 생성 마무리를 위해 "Complete setup"버튼을 누른다.

출처:https://www.lainyzine.com/ko/article/how-to-create-an-organization-for-collaboration-on-github/

 

어떻게 사용해?


사용은 간단하다.

1. 기본적으로 Local Repository에는 Remote로 upstream과 orgin이 둘다 잡혀있어야 한다.

git remote add origin "origin git repository 주소"

git remote add upstream "upstream git repository 주소"

아래 그림과 같은 결과가 되어야한다.

 

2. 이후 upstream과 origin의 commit기록을 맟추기 위해 아래와 같은 작업을 수행한다.

  1. git fetch upstream
  2. git merge upstream/브랜치명
  3. git add .
  4. git commit -m "커밋명"
  5. git push origin 브랜치명

3. 해당 코드를 수정후 아래 작업을 수행한다.

  1. git add .
  2. git commit -m "커밋명"
  3. git push origin 브랜치명

4. 이후 GitHub Origin Repsitory로 가서 Pull Reqeust를 한다.

'CS' 카테고리의 다른 글

CI/CD? Jenkins?  (5) 2024.09.01
형상 관리란?  (0) 2024.08.29
다형성  (0) 2024.06.28
클래스 다이어그램  (0) 2024.06.28
객체 vs 클래스  (0) 2024.06.21