Stash only some of the currently modified files

This question already has an answer here:

  • Stash changes to specific files 5 answers
  • Stash only one file out of multiple files that have changed with Git? 24 answers

  • I found git stash push can be used to easily stash multiple files.

    To stash the files from the example the command would be

     git stash push MyClass.h MyClass.cpp
    

    Which stashes MyClass.h and MyClass.cpp but leaves main.cpp alone.

    Found in an edit to this answer

    链接地址: http://www.djcxy.com/p/24498.html

    上一篇: 如何仅固定某些文件?

    下一篇: 仅存储一些当前修改的文件