본문 바로가기
오류

GitBash_Everything up-to-date

by 신방동불주먹 2022. 10. 19.

https://kotlinworld.com/m/281

 

[Git] git restore 사용해 파일 단위 제어하기(git add 취소, 특정 커밋으로 되돌리기 등)

git restore이란? git checkout은 하나의 키워드에 많은 기능이 들어있다. 때문에 checkout의 브랜치와 관련된 기능이 git switch 명령어로 새로 나오게 됐다. git restore 또한 새로 나온 키워드로 git의 파일 조

kotlinworld.com

 

$ git restore --staged Sqldate1019.sql

 

git을 조작하다 보면 파일을 잘못 add 할 때가 있다. 이때 add된 파일은 Staging Area로 올라가게 되는데, 이를 다시 Unstaged Area로 옮기기 위한 키워드가 바로 git restore --staged 이다. 우리는 git restore --staged [file name] 을 사용해 특정 파일의 add를 취소할 수 있다.