hg: How do I revert (a single file) several commits back?

孤街浪徒 提交于 2019-12-21 21:24:55

问题


The closest answer is this one, and here's a line from it:

hg revert -r <oneRevBack> fileName

The last thing is to get <oneRevBack> other than using hash. I would dream of just typing <-1>.


回答1:


The hg syntax for "one rev back" is tip^, where tip is the latest revision and ^ means "parent". If your working directory is not at tip, use .^, where the dot means "current revision".



来源:https://stackoverflow.com/questions/20971306/hg-how-do-i-revert-a-single-file-several-commits-back

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!