Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/mercurial/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Version control 用远程文件替换本地文件_Version Control_Mercurial - Fatal编程技术网

Version control 用远程文件替换本地文件

Version control 用远程文件替换本地文件,version-control,mercurial,Version Control,Mercurial,如何用存储库中的最新版本替换本地文件 是否还有方法替换与存储库中相应文件冲突的所有本地文件?svn update 或者删除您的文件夹,然后svn签出 或者尝试选项--force.这两个hg update-C和hg revert都将执行您正在查找的操作-使用存储库中的干净版本替换本地修改的文件。就我个人而言,我更喜欢hg revert,但是hg up-C也会做这项工作 汞还原 有关hg revert With no revision specified, revert the specified

如何用存储库中的最新版本替换本地文件

是否还有方法替换与存储库中相应文件冲突的所有本地文件?

svn update

或者删除您的文件夹,然后svn签出


或者尝试选项--force.

这两个
hg update-C
hg revert
都将执行您正在查找的操作-使用存储库中的干净版本替换本地修改的文件。就我个人而言,我更喜欢
hg revert
,但是
hg up-C
也会做这项工作

汞还原 有关
hg revert

With no revision specified, revert the specified files or directories to
the contents they had in the parent of the working directory. This
restores the contents of files to an unmodified state and unschedules
adds, removes, copies, and renames. If the working directory has two
parents, you must explicitly specify a revision.

Using the -r/--rev or -d/--date options, revert the given files or
directories to their states as of a specific revision. Because revert does
not change the working directory parents, this will cause these files to
appear modified. This can be helpful to "back out" some or all of an
earlier change. See "hg backout" for a related method.

Modified files are saved with a .orig suffix before reverting. To disable
these backups, use --no-backup.
希望有帮助


Chris

对于s单个文件:
hg恢复文件名