본문 바로가기

Python_Beginer/GIT

[GIT]Tracked File / Untracked File(추적상태 / 비추적상태)

반응형
$ vim hello.txt
$ vim hello2.txt
$ git status
$ git add hello.txt
$ git add hello2.txt
$ git commit -m "message3"
$ git log
$ git log --stat

1. Tracked

: 한 번이라도 커밋을 한 파일의 수정 여부를 계속 추적하는 상태

 

Changes not staged for commit: 
  (use "git add ..." to update what will be committed) 
  (use "git restore ..." to discard changes in working directory) 
        modified:   hello.txt

 

2. Untracked

: 한 번도 깃에서 버전 관리를 하지 않았기 때문에 수정내역을 추적하지 않는 상태

 

Untracked files:
  (use "git add ..." to include in what will be committed)
        hello2.txt

 

3. git log --stat

: 커밋에 관련된 파일까지 함께 기록 확인

commit fd51bf28f13ae3c337a4209febc96bfbbdc1331c (HEAD -> master)
Author: AnKiWoong <ankiwoong@gmail.com>
Date:   Fri Jan 3 20:32:20 2020 +0900

    message3

 hello.txt  | 1 +
 hello2.txt | 4 ++++
 2 files changed, 5 insertions(+)

commit 040d13b110d44c9d48fac14b0948225248f7a348
Author: AnKiWoong <ankiwoong@gmail.com>
Date:   Thu Jan 2 20:43:17 2020 +0900

    message2

 hello.txt | 1 +
 1 file changed, 1 insertion(+)

commit 0f4285bedfbf470de8f325c6763e3a76713c4aa7
Author: AnKiWoong <ankiwoong@gmail.com>
Date:   Thu Jan 2 20:35:37 2020 +0900

    message1

 hello.txt | 1 +
 1 file changed, 1 insertion(+)

 

반응형