danbibibi
article thumbnail
Published 2024. 4. 23. 14:44
[Git] git stash DevOps

git stash

  • 아직 마무리하지 않은 작업을 스택에 잠시 저장할 수 있도록 하는 명령어
  • 아직 마무리하지 않은 작업은 commit 하지 않고 나중에 다시 꺼내와 마무리할 수 있음

# stash 스택에 임시 작업 저장
$ git stash 
# 혹은
$ git stash save

# stash 목록 확인
$ git stash list

# stash 적용 ( = 하던 작업 가져오기)
$ git stash apply
$ git stash apply [apply 이름]
$ git stash apply --index # staged 상태까지 저장

# 스택에 남아 있는 stash 제거
$ git stash drop

# drop + apply
$ git stash pop

# stash 적용한 것 되돌리기
git stash show -p | git apply -R

'DevOps' 카테고리의 다른 글

[Docker] Docker rootless 설치  (0) 2024.03.21
[Jenkins] Agent Node 추가  (0) 2024.03.20
[Jenkins] Jenkins 정리  (0) 2024.02.29
[Docker] Docker 정리  (0) 2024.02.28
CI/CD(지속적 통합/배포) 정리  (0) 2024.02.28
profile

danbibibi

@danbibibi

꿈을 꾸는 시간은 멈춰 있는 것이 아냐 두려워하지 마 멈추지 마 푸른 꿈속으로