티스토리 뷰

etc/git

[GIT] add 취소하기

daeuun 2023. 2. 15. 09:03

add 취소하기 : staged 상태를 unstage 로 변경

$ git restore --staged {파일명}

 

$ git restore --staged  ../batch/src/main/kotlin/com/beside/backend/batch/job/wisesaying/WiseSayingJobConfiguration.kt
$ git status                                                                                                          
On branch daeun
Changes to be committed:
  (use "git restore --staged <file>..." to unstage)
        new file:   ../api/src/test/kotlin/com/beside/backend/api/service/emotion/EmotionServiceTest.kt

Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
        modified:   ../api/src/main/kotlin/com/beside/backend/api/service/writingtopic/WritingTopicService.kt
        modified:   ../batch/src/main/kotlin/com/beside/backend/batch/job/wisesaying/WiseSayingJobConfiguration.kt

Untracked files:
  (use "git add <file>..." to include in what will be committed)
        ../api/src/test/kotlin/com/beside/backend/api/ApiApplicationTest.kt

 

 

 

 

 

반응형
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
글 보관함