git flow init
branch의 이름을 정함(보통 다 엔터로 넘긴다)
$ git flow init
No branches exist yet. Base branches must be created now.
Branch name for production releases: [master]
Branch name for "next release" development: [develop]
How to name your supporting branch prefixes?
Feature branches? [feature/]
Bugfix branches? [bugfix/]
Release branches? [release/]
Hotfix branches? [hotfix/]
Support branches? [support/]
Version tag prefix? []
Hooks and filters directory? [D:/workspace/fds12/git-flow-practice/.git/hooks]
git flow feature start
$ git flow feature start README-edit
Switched to a new branch 'feature/README-edit'
Summary of actions:
- A new branch 'feature/README-edit' was created, based on 'develop'
- You are now on branch 'feature/README-edit'
Now, start committing on your feature. When done, use:
git flow feature finish README-edit
git flow feature finish
$ git flow feature finish README-edit
Switched to branch 'develop'
Updating 56fb40d..51acd9e
Fast-forward
README.md | 5 +++++
1 file changed, 5 insertions(+)
create mode 100644 README.md
Deleted branch feature/README-edit (was 51acd9e).
Summary of actions:
- The feature branch 'feature/README-edit' was merged into 'develop'
- Feature branch 'feature/README-edit' has been locally deleted
- You are now on branch 'develop'
git flow release start
$ git flow release start v0.0.1.00190320001
Switched to a new branch 'release/v0.0.1.00190320001'
Summary of actions:
- A new branch 'release/v0.0.1.00190320001' was created, based on 'develop'
- You are now on branch 'release/v0.0.1.00190320001'
Follow-up actions:
- Bump the version number now!
- Start committing last-minute fixes in preparing your release
- When done, run:
git flow release finish 'v0.0.1.00190320001'
git flow release finish
$ git flow release finish v0.0.1.00190320001
Switched to branch 'master'
Merge made by the 'recursive' strategy.
README.md | 5 +++++
1 file changed, 5 insertions(+)
create mode 100644 README.md
Already on 'master'
Switched to branch 'develop'
Already up to date!
Merge made by the 'recursive' strategy.
Deleted branch release/v0.0.1.00190320001 (was 51acd9e).
Summary of actions:
- Release branch 'release/v0.0.1.00190320001' has been merged into 'master'
- The release was tagged 'v0.0.1.00190320001'
- Release tag 'v0.0.1.00190320001' has been back-merged into 'develop'
- Release branch 'release/v0.0.1.00190320001' has been locally deleted
- You are now on branch 'develop'
버전 가이드
- v0.0.1.
- v0.0.1.00190320001
- v0.0.1.00190320001a
- v0.0.1.00190320001b2
fork와 작업, pull requests 방법
1. fork
2. 리모트를 fork했던 주소로 하나 만들어 준다.
$ git remote add rmorigin [fork했던 주소]
3. 내가 변경하고 싶은 같은 브런치를 만들고 해당 브런치로 변경
4. 최신 상태로 만든다.
$ git fetch rmorigin
$ git merge rmorigin/develop
5. 작업 : add,commit,push
6. pull requests를 날린다.
"특히 commit log에 다음과 같이 명확히 구분해 주는 것이 이 로그를 보는 사람에게도 많은 도움이 되겠다."
- feat: 새로운 기능을 추가할 경우
- fix: 버그를 고친 경우
- docs: 문서 수정한 경우
- style: 코드 포맷 변경, 세미 콜론 누락, 코드 수정이 없는 경우
- refactor: 프로덕션 코드 리팩터링
- test: 테스트 추가, 테스트 리팩터링 (프로덕션 코드 변경 없음)
- chore: 빌드 테스크 업데이트, 패키지 매니저 설정할 경우 (프로덕션 코드 변경 없음)
- 출처 : https://sujinlee.me/professional-github/
'개발 > Git' 카테고리의 다른 글
[gitignore] .gitignore 적용 안될 때 (0) | 2019.07.26 |
---|---|
[git flow] error: cannot stat '' Permission denied (0) | 2019.06.19 |