简体   繁体   English

在hg diff patch中包含新文件

[英]Include new files in hg diff patch

How can I add a new file to mercurial diff patch ? 如何在mercurial diff补丁中添加新文件? I can't seem to find any information in the man pages. 我似乎无法在手册页中找到任何信息。

I'm not sure I fully understand your question but, if you are using Mercurial to generate a diff patch, the way to include new files you want to add to a repo is by marking the new files as part of the repo by using the hg add command and then doing the diff . 我不确定我是否完全理解您的问题,但是,如果您使用Mercurial生成差异补丁,那么将要添加到回购的新文件包含的方法是将新文件标记为回购的一部分,方法是使用hg add命令然后执行diff

hg add newfile
hg diff > my.patch

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM