https://studyingazae.tistory.com/18
1. Git 폴더 초기화 (init / pull)
git init : 현재 폴더를 기준 폴더로 하고 git을 관리
git pull : 현재 폴더에 모든 github 파일 업데이트
2. Git 상태 확인 (status / log)
git status : 현재 상태 출력
git log : 현재 commit 로그 등 출력
3. Branch 확인/생성/이동
// 저장소 확인 git remote
// 브랜치
git branch : 모든 브랜치 확인, 현재 브랜치 색 다름
git branch 브랜치명 : 새로운 브랜치 생성
git checkout 브랜치명 : 브랜치 이동
git merge 합쳐질_브랜치명 : 명령어를 실행하는 브랜치에 합쳐질_브랜치가 합쳐짐
4. Github에 업로드 (add / commit / push)
// 업로드할 파일 추가
git add 파일명
git add *
// commit
git commit -m "코멘트"
// 최신 commit 코멘트 수정
git commit --amend
// commit revert (히스토리 유지)
git revert 원복할 commitID
// 업로드
git push 저장소명 브랜치명
git push origin main
5. git flow
git-flow --help