# git switch / restore

> Clean Markdown view of GeekNews topic #2622. Use the original source for factual precision when an external source URL is present.

## Metadata

- GeekNews HTML: [https://news.hada.io/topic?id=2622](https://news.hada.io/topic?id=2622)
- GeekNews Markdown: [https://news.hada.io/topic/2622.md](https://news.hada.io/topic/2622.md)
- Type: news
- Author: [xguru](https://news.hada.io/@xguru)
- Published: 2020-08-10T09:46:20+09:00
- Updated: 2020-08-10T09:46:20+09:00
- Original source: [honeymon.io](http://honeymon.io/tech/2019/08/30/git-2.23-release.html)
- Points: 13
- Comments: 3

## Topic Body

혼합되어 사용되던 checkout 의 기능을 브랜치 변경용 switch , 파일 복원용 restore로 분리한 것

1년 전에 출시된 git 2.23 버전 부터 실험적으로 추가된 기능으로 2.28 인 현재도 마찬가지 ( 차후에 변경 가능 )

git switch : 브랜치를 변경

ㅤ-c 브랜치 생성

git restore : 작업중인 파일을 복원

## Comments



### Comment 2552

- Author: encyphered
- Created: 2020-08-11T02:16:08+09:00
- Points: 1

restore 는 간간히 쓰긴 하는데 switch 는 아직 적응안되서 걍 checkout... -0-

### Comment 2545

- Author: curioe
- Created: 2020-08-10T09:52:39+09:00
- Points: 1

앗 하긴 체크아웃으로 파일 복원하는 게 뭔가 어색하긴 하네요~

### Comment 2544

- Author: xguru
- Created: 2020-08-10T09:46:43+09:00
- Points: 1

이 기능이 트위터에서 얘기가 되길래 공유해봅니다.

git --help 메인 도움말에서는 이미 checkout 명령은 안보이게 변경되었습니다. ( sparse-checkout 만 남아있습니다. )
