본문 바로가기

Python_Beginer/GIT

[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

반응형

'Python_Beginer > GIT' 카테고리의 다른 글

[GIT]Git Diff(변경 사항 확인)  (0) 2020.01.03
[GIT]Git Log(커밋 기록 확인)  (0) 2020.01.03
[GIT]Repository(저장소)  (0) 2020.01.02
[GIT]Stage(스테이지)  (0) 2020.01.02
[GIT]Working Tree(작업 트리)  (0) 2020.01.02