용어
Upstream refers to the main repository that people use to collaborate
When you clone a repo from a remote server, Git automatically names it origin. Often, you might fork a repo to you own Github account. In this scenario, origin would be the URL of your for. If you want to syncc your fork with original repo, you need to add it as a remote, and this is generally named upstream
브랜치들
1. Upstream branches: 팀에서 관리하는 배포 가능한 브랜치를 몇개 타겟으로 둠.
2. Origin Branches: 팀원이 Fork한 Origin의 브랜치. 주로 다음과 같이 관리
- main: 작업을 시작하기 전 upstream 브랜치를 pull하는 용도
- issues: 협업 툴로 만든 이슈. 여기서 작업
Flow
1. Team Repo를 Fork하고 Fork한 Repo를 local에 clone
git clone FORK_REPO_URL
2. Temp Repo를 upstream으로 설정
git remote add upstream TEAM_REPO
3. local에서 작업을 시작할 때 팀원에 의해 upstream's main이 업데이트 되었다면 한 번 pull해줌
git pull (--rebase) upstream main
4. 작업 브랜치 생성
git checkout -b BRANCH_NAME
- 작업을 하면서 계속 upstream's main이 업데이트 되었다면 지속적으로 pull해줌
5. 구현 후 origin에 push
6. 풀리퀘
- from: origin의 브랜치
- to: upstream의 브랜치
- auto closing keyword와 issue 태깅.
- (여러 이슈에 해당하는 작업인 경우에 해당. close, closes, closed, fix, fixes, fixed, resolve, resolves, resolved 키워드 사용)
- reivewer 할당
- reviewer는 review를 마친 후 수정사항이 반영되면 approve
- Requestor는 최종확인 후 merge
'dev-log' 카테고리의 다른 글
| [JavaScript] 자바스크립트의 배열 (0) | 2024.12.03 |
|---|---|
| URL과 프론트엔드 상태에 관한 짧은 생각 (2) | 2024.11.30 |
| 렌더링 렌더링 그놈의 렌더링 (0) | 2023.08.14 |
| 20230728 (0) | 2023.07.28 |
| RN에서 View를 그릴 때 (0) | 2023.07.19 |