728x90
반응형
git stash
git stash는 현재 진행중인 작업들을 commit 하지 않고 임시 저장 후 나중에 불러와서 다시 작업을 진행할 수 있도록 도와주는 명령어이다.
stash 임시 저장
git stash 명령어를 사용하여 stash에 저장되고 이때 작성중인 working directory는 이전상태로 돌아간다.
$ git stash
$ git stash save
stash 저장 목록 확인
$ git stash list
stash@{0}: WIP on refactor-code: fdc47a753 refactor code
stash 저장 가져오기
# 최근 stash 가져오기
$ git stash apply
# 특정 stash 가져오기
$ git stash apply stash@{0}
stash 제거
# 최근 stash 제거
$ git stash drop
# 특정 stash 제거
$ git stash drop stash@{0}
728x90
반응형
'Programming > Git' 카테고리의 다른 글
[Git] webhooks 을 이용한 auto git pulling 구성 (git pull with webhooks) (61) | 2023.02.13 |
---|---|
[git] git branch 이름 변경 (0) | 2022.05.20 |
[git] git push 되돌리기 - reset (0) | 2021.11.25 |
[Git] git push error - 토큰 인증 (Please use a personal access token instead) (0) | 2021.11.25 |
[git] Please make sure you have the correct access rights and the repository exists. (0) | 2021.11.17 |
댓글