Stash changes while keeping the changes in the working directory in Git

后端 未结 5 1836
庸人自扰
庸人自扰 2020-12-23 00:24

Is there a git stash command that stashes your changes, but keeps them in the working directory too? So basically a git stash; git stash apply in o

5条回答
  •  醉梦人生
    2020-12-23 00:39

    A small enhancement in the answer which in practical may likely to use.

    $ git add modified-file.txt  
    (OR $ git add .    ---- for all modified file)
    $ git stash save --keep-index "Your Comment"
    

提交回复
热议问题