我想“提取”(如果这是一个好词)只是未暂存的文件并将它们复制到不同的目录。我不想要 repo 中的任何其他文件......只是这些未暂存的文件。
是否有 git 命令或 shell + git 命令来执行此操作?
更新问题以回答问题:
git ls-files -m | tar Tc - | tar Cx /path/to/other/dir
Run Code Online (Sandbox Code Playgroud)
如果 Windows 不是一个因素,我会只用cpio -pd /path/to/other.