Accidentally i hg add
ed several binary compiled files from a project along with tons of little changes on several files.
my hg status
now show that i have a dozen files modified (correctly) and two dozen files added (mistake).
how do i undo that?
Most answers here tell me to install the MQ extension or to use rollback, but the manual for MQ ext says that i'm not really supposed to use it and that there are (slightly more complicated) ways of doing the same MQ does with mainline hg -- though it fails to show how. and rollback shows warnings about not being supposed to be used because it is deprecated.
So, how do i remove from my upcoming commit the files added by mistake, while keeping the modified files that i want to commit?
当您添加 (而不是修改)文件时,意外使用了hg forget FILENAME
而不是hg revert FILENAME
。
You can revert those files. hg revert fileyouwanttorevert otherfileyouwanttorevert
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.