Stash
- 작업중 급하게 다른 변경사항을 작업해야 할때 현재 작업을 임시로 보관하는 기능
git stash
를 입력한다git stash pop
을 입력하면 임시 저장한 작업 내역을 불러올 수 있다.git stash -p
git add -p
와 마찬가지로 stash 할 부분을 선택할 수 있다.git stash -m <메시지>
git stash -m "Add Stash3"
입력하고 stash가 되었는지 확인한다.git stash list
git stash apply [stash 번호]
git list에서 적용할 stash를 확인한 후 터미널에 해당 명령어를 입력해 적용한다.
git stash apply stash@{1}
stash 된 내용을 확인할 수 있다
git stash drop [stash 번호]
git stash pop [stash 번호]
git stash branch (브랜치명)