Git 기본 3 - Add Commit Push

기준맨·2023년 2월 21일

conventional commits

  • commit의 제목은 commit을 설명하는 하나의 구나 절로 완성
  • importanceofcapitalize Importance of Capitalize
  • prefix 꼭 달기
    - feat : 기능 개발 관련
    - fix : 오류 개선 혹은 버그 패치
    - docs : 문서화 작업
    - test : test 관련
    - conf : ghksrudtjfwjd rhksfus
    - build : 빌드 관련
    - ci : Continuous Integration
prefix e.g.
feat : Add server.py
fix : Fix Typo server.py
docs : Add README.md, LICENSE
conf : Create .env, .gitignore, dockerfile
BREAKING CHANGE : Drop Support /api/vi
refactor : Refactor user classes

add commit push

git clone 으로 생성한 repo의 변화가 있을 시 add - commit - push순으로 변경된 파일 등을 repo에 업로드 하는 것이다.

# repo에 변화가 있는지 확인
$ git status
# staging area에 업로드
$ git add file_name
$ git add .  = 수정된 파일 모두 업로드 (human error 위해서 안쓰는게 좋음)

# localrep에 업로드
$ git commit
$ git commit -m ""  : ""안에 메시지가 commit가 됨

$ git push origin {branch명}

최종적으로 push를 통해 github repo에 업로드가 된다.

0개의 댓글