Difference between git stash pop and git stash apply

前端 未结 7 810
忘了有多久
忘了有多久 2020-11-29 14:21

I\'ve been using git stash pop for quite some time. I recently found out about the git stash apply command. When I tried it out, it seemed to work

7条回答
  •  粉色の甜心
    2020-11-29 14:45

    In git stash is a storage area where current changed files can be moved.

    stash area is useful when you want to pull some changes from git repository and detected some changes in some mutual files available in git repo.

    git stash apply //apply the changes without removing stored files from stash area.
    
    git stash pop  // apply the changes as well as remove stored files from stash area.
    

    Note :- git apply only apply the changes from stash area while git pop apply as well as remove change from stash area.

提交回复
热议问题