본문 바로가기
Programming/Git

git stash - 작업 임시 저장

by Chan_찬 2020. 6. 16.
728x90

git stash

작업 중에 다른 브랜치로 체크아웃하거나 마스터를 리베이스할 경우에 사용하면 좋다


# without message

> > > git stash  
> > > git stash save

# git stash save

> > > git stash save update tag

> > > git stash list  
> > > stash@{0}: On branch\_name: update tag  
> > > stash@{1}: WIP on branch\_name: 49bf139 replace parenthesis

# 0: git stash save update tag 결과

# 1: git stash

# commit 한거, commit 안한거 모두 commit 안한거로 unstash

> > > git stash apply

# commit 한거, commit 안한거 그대로 unstash

> > > git stash appy --index

# stash 제거

> > > git stash drop

# unstash + drop = 적용과 동시에 제거

> > > git stash pop
728x90
728x90

'Programming > Git' 카테고리의 다른 글

squash - git commit을 깔끔하게  (0) 2020.06.22
git force push  (0) 2020.06.18
git pull overwrite  (0) 2020.06.10
git pull without login - for gitlab  (0) 2020.06.09
git diff patch - 패치 생성/적용  (0) 2020.06.08
Buy me a coffeeBuy me a coffee

댓글