Introduction to Git

Worldi·2021년 3월 11일
0

  • working directory
    the files currently visible on your file system, 파일이 있는 장소

  • the staging area. Index
    the index of changes to be written to the repository after the next commit ,바로 다음에 커밋할 것

  • the repository ,HEAD
    stores files, records the changes made to the files over time ,현재 branch 가 가리키는 포인터, 가장 마지막 커밋

File lifecycle in your working directory

  • Tracked
    unmodified, modified, staged
    tracked and unmodified after first cloning
  • Untracked
    not in your last snapshot and are not in your staging area
  • Unmodified
    you haven’t changed this file since your last commit
  • Modified
    you’ve modified this file in some fashion since your last commit
  • Git really only knows about files, and nothing about directories
    touch .keep under directory for detecting directory
  • git log
    shows you the basic commit history of your repository
  • git log -p
    shows the commit history of your repository with the corresponding diffs.

  • git diff
    to see the changes in working dir. and the changes in staging area

  • git diff --staged(cached)
    compares your staged changes to your last commit

profile
https://worldi.tistory.com/ 로 블로그 이전합니다.

0개의 댓글