[GIT]Staging + Commit(스테이징 + 커밋)
1. 문서 수정
$ vim hello.txt
1
2
2. 깃 상태 확인
$ git status
On branch master
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
no changes added to commit (use "git add" and/or "git commit -a")
3. 스테이징과 커밋 처리
: 한번 커밋한 파일이라면 가능
$ git commit -am "message2"
warning: LF will be replaced by CRLF in hello.txt.
The file will have its original line endings in your working directory
[master 040d13b] message2
1 file changed, 1 insertion(+)
4. 깃 정보 확인
$ git log
commit 040d13b110d44c9d48fac14b0948225248f7a348 (HEAD -> master)
Author: AnKiWoong <ankiwoong@gmail.com>
Date: Thu Jan 2 20:43:17 2020 +0900
message2
commit 0f4285bedfbf470de8f325c6763e3a76713c4aa7
Author: AnKiWoong <ankiwoong@gmail.com>
Date: Thu Jan 2 20:35:37 2020 +0900
message1