我错误地从我的工作区删除了很多文件,我也有很多修改过的文件。如何一次性还原已删除的文件(而不是修改后的文件)?
deleted: src/main/content/jcr_root/components/mega-menu/directives/dropdown.js
deleted: src/main/content/jcr_root/js/components/mega-menu/directives/sub-menu.js
deleted: src/main/content/jcr_root/js/components/mega-menu/mega-menu-module.js
deleted: src/main/content/jcr_root/js/components/mobile-menu.js
modified: src/main/content/jcr_root/js/components/product-list.js
modified: src/main/content/jcr_root/js/components/product-shipping.js
modified: src/main/content/jcr_root/js/components/reward-category.js
我在我的一个本地功能分支中尝试了此操作:git reset HEAD \*
然后git checkout --
,但这似乎还原了已删除和已修改的功能。