如何创建手动差异?
我有一个现有的代码库,我想突出显示其中的特定部分以进行演示。我们使用审查板,它允许用户上传差异并方便地将其与相关存储库进行比较。
鉴于此,有没有一种好方法可以手动创建差异,以便它将显示已添加的相关部分?我想到的唯一方法是删除相关代码并反转差异。
I have an existing codebase that I'd like to highlight particular portions of for demonstration purposes. We use Review Board, which allows a user to upload a diff and conveniently compare it against the repository in question.
That given, is there a good way to create a diff manually so it will show the relevant portions as having been added? The only way that comes to mind is by deleting the relevant code and reversing the diff.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
手动使用
diff
命令:如果您已经使用版本控制软件(如 git、svn、hg...),则可以在提交之前直接使用它们:
Use
diff
command manually:If you are already using a version control software (like git, svn, hg...), you can directly use them before commit: