1. Git 프로젝트 다운로드 하기
$ git clone {git clone link}
2. Git branch 확인 명령어
$ git branch
main
* dltjdgh0428
3. Git 마지막 커밋 확인 명령어
$ git branch -v
main 3a75cee style : 불필요한 주석 및 오타수정
* review 873c60f Initial commit
4. Git 브랜치 생성 및 이동
$ git checkout -b {branch name}
5. Git branch에 프로젝트 업로드 하기
5-1 변경사항을 업데이트합니다.
$ git add -a
여기서 커밋 메세지를 두가지 종류로 작성할 수 있습니다.
5-2-type A 커밋 메시지의 제목을 작성합니다.
$ git commit -m "feat : 00 기능 구현"
5-2-type B 커밋 메세지의 제목과 내용을 작성합니다.
$ git commit -m "feat : 00 기능 구현 " -m " MainController method가 변경되었습니다. "
5-3 커밋내용을 Github에 push 합니다.
$ git push origin {branch name}
6. Git branch에서 프로젝트 가져오기
$ git pull origin {branch name}
7. Git branch 삭제하기
$ git branch -d {branch name}
커밋 컨벤션
- feat: 새로운 기능 추가
- 예시: feat: 사용자 등록 기능 추가
- fix: 버그 수정
- 예시: fix: 로그인 버그 수정
- docs: 문서 변경
- 예시: docs: 설명서 업데이트
- style: 코드 스타일 변경 (공백, 포맷팅 등)
- 예시: style: 코드 서식 수정
- refactor: 코드 리팩터링 (기능 변경 없음)
- 예시: refactor: 데이터베이스 연결 리팩터링
- test: 테스트 코드 추가 또는 수정
- 예시: test: 회원가입 테스트 추가
- chore: 그 외의 작업 (빌드, 도구 설정, 패키지 업데이트 등)
- 예시: chore: 빌드 스크립트 업데이트
'Git' 카테고리의 다른 글
[GitHub Actions] CI/CD 주요정보 Secrets로 관리하기 (0) | 2024.03.03 |
---|---|
[GitHub Actions] GitHub Actions을 통하여 CI/CD 파이프라인 구축하기 (0) | 2024.03.03 |
[Git] 원격 저장소 명령어 (0) | 2024.02.07 |
[Git] pull request 사용하여 편하게 리뷰하기 (2) | 2023.11.17 |