깃헙 이미지 링크
<aside> <img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" alt="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="40px" /> 깃을 공부하면서 기록합니다.
</aside>
git init
/.git 라고 하는 저장소가 생성되고, 해당 저장소에서 버전을 관리한다.Working-tree vs Staging-area vs Repository
Working-tree : 작업이 이루어진 모든 파일이 존재하는 영역 → git status
Staging-area : 버전 관리를 진행할 파일이 올라가 있는 무대 같은 영역 → git add
Repository : 버전이 관리되고 있는 파일들이 저장된 공간 → git commit , git log
커밋 메시지 변경하기 : git commit —amend
<aside> <img src="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" alt="https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png" width="40px" /> 개발자가 로컬에서 작업 → Working-tree에 있는 파일들 중에서 버전을 관리하고 싶은 파일을 Staging-area에 올린다. → 버전에 따라서 Repository에 최종적으로 해당 파일을 올린다.
</aside>
git log
git log —stat : 버전 별로 어떤 파일, 어떤 변경점 등이 있는지 확인할 수 있다.git diff : 파일의 수정 사항을 알려준다.git log —graph —all —oneline : 버전별 변경사항을 한 줄로 그래프 형태로 보여준다.