2023.11.20(월)
feature/new-login
, bugfix/header-styling
Branch Category | Prefix | Examples |
---|---|---|
Feature Branches (기능 개발) | feature/ | feature/login feature/select-product |
Bugfix Branches (버그 수정) | bugfix/ | bugfix/header-styling bugfix/issue-342/button-overlap-form-on-mobile |
Hotfix Branches (긴급 수정) | hotfix/ | hotfix/critical-security-issue hotfix/v1.2.1 |
Release Branches (출시 준비) | release/ | release/v1.0.1 |
Documentation Branches (문서 작성) | docs/ | docs/api-endpoints |
test
, dev
(develop), exp
(experiment), refactor
...jaekyung.hwang-feature-checkout
: jaekyung hwang이 해당 checkout feature 지점에서 작업했음을 암시git merge --no-ff
git merge
git rebase
git merge --squash
Branch protection rule은 언제든지 수정/삭제 가능
협업 시 필요
PR message 잘 쓰기 (Markdown 사용 가능)
추가한 branch 삭제 (Restore branch 버튼으로 복구 가능) (revert?)
git reflog
로 commit과 HEAD 번호 확인 후 git checkout -b <branch이름> <HEAD@{숫자}>
🔗Git에서 remote branch의 변경 사항 동기화
git fetch
🔗
원격 저장소 또는 branch에 적용된 변경 사항 확인 가능
git pull과 비교했을 때 fetch는 변경 내용을 local에 반영하지 않지만, pull은 변경 내용을 local에 반영하기 때문에 주의해야 함
⇒ merge
나 pull
전에 fetch
로 변경 사항을 먼저 확인하는 것이 안전
-p
또는 --prune
(가지치기) tag로 remote에 더 이상 존재하지 않는 remote-tracking references 제거
git fetch -p
로 local & remote branch 동기화