-
Notifications
You must be signed in to change notification settings - Fork 22
Git Workflow
Haksung Jang edited this page Aug 30, 2020
·
6 revisions
OpenChain-KWG 웹사이트 개발을 위한 Git Workflow를 설명합니다.
- https://github.com/OpenChain-Project/OpenChain-KWG 에 방문하여,
- 화면 우상단의 Fork 버튼을 눌러 fork합니다.
Fork한 repository를 Local working directory로 Clone하고, Remote에 Upstream repository를 추가합니다.
$ git clone https://github.com/[user]/OpenChain-KWG.git
Cloning into 'OpenChain-KWG'...
remote: Enumerating objects: 72, done.
remote: Counting objects: 100% (72/72), done.
remote: Compressing objects: 100% (57/57), done.
remote: Total 7794 (delta 32), reused 39 (delta 11), pack-reused 7722R
Receiving objects: 100% (7794/7794), 90.95 MiB | 9.70 MiB/s, done.
Resolving deltas: 100% (3302/3302), done.
Updating files: 100% (7313/7313), done.
$ cd OpenChain-KWG
$ git remote add upstream https://github.com/OpenChain-Project/OpenChain-KWG.git
$ git remote -v
origin https://github.com/[user]/OpenChain-KWG.git (fetch)
origin https://github.com/[user]/OpenChain-KWG.git (push)
upstream https://github.com/OpenChain-Project/OpenChain-KWG.git (fetch)
upstream https://github.com/OpenChain-Project/OpenChain-KWG.git (push)
(Clone후 시간이 지난 시점이라면) fetch했을때 upstream에 변경 사항이 있을 경우 경우 rebase하여 master branch를 최신 상태로 유지합니다.
$ git fetch upstream
$ git checkout master
$ git rebase upstream/master
개발용 Branch를 생성합니다.
$ git checkout -b develop
수정 사항을 반영 후 Commit 합니다. commit message는 가능한 자세히 작성하세요.
$ git add .
$ git commit
생성한 commit을 origin의 develop branch에 push합니다.
$ git push -f origin develop
GitHub 사이트로 가서 Pull Request를 생성합니다. 이때 Upstream repository의 develop branch로 Create Pull Request하여 수정사항을 제출합니다.
문의나 요청이 있을 경우 Issue를 생성하세요! : https://github.com/OpenChain-Project/OpenChain-KWG/issues/new