简体   繁体   English

如何查看在 Visual Studio Code 中删除某行之前存在的最后一次提交?

[英]How do I see last commit that a line existed before it was deleted in Visual Studio Code?

For example, if in the first commit I've introduced a line 'example-line' to file 'f.txt', and in the third commit I've deleted that line from 'f.txt', and now I'm in the fifth commit.例如,如果在第一次提交中我在文件“f.txt”中引入了一行“example-line”,并且在第三次提交中我从“f.txt”中删除了该行,现在我是在第五次提交中。 How can I tell in Visual Studio code (or any other simple way) that 'example-line' was deleted in the third commit?我如何在 Visual Studio 代码(或任何其他简单方法)中判断“example-line”在第三次提交中被删除?

You could find the deletion commit with你可以找到删除提交

git log -1 -S "example-line"

(see -S doc here ) (请参阅此处的-S文档)

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

相关问题 如何在 Visual Studio 代码中查看文件/文件的内容? - How do I see the contents of the file / files in visual studio code? 如何找到提交历史记录中存在特定代码行的文件? - How can I find the file that a particular line of code existed within in my commit history? 如何配置 Visual Studio 代码以在保存时提交到 git? - How can I configure visual studio code to commit to git on save? 如何使用命令行查看最后推送的提交 - How can I use the command line to see which commit was pushed last 如何在Visual Studio提交详细信息中查看Git分支? - How to See Git Branch in Visual Studio Commit Details? 在提交/推送到TFS之前,是否可以在Visual Studio中查看更改内容? (Git Diff的Gui) - Is it possible to see what your changed in Visual Studio before you commit/push it to TFS? (Gui of Git Diff) Visual Studio 代码 Git“还原提交(通过终端)”删除了我的文件 - visual studio code Git "revert commit (via terminal)" deleted my files 如何查看上次或特定提交中更改的文件列表? - How can I see the list of files changed in last or a particular commit? 如何从 Visual Studio 2015 中删除已删除的 Git 分支 - How do I remove deleted Git branches from Visual Studio 2015 如何在 Visual Studio 2019 中使用 git 集线器恢复已删除的文件 - How do I recover deleted files using git hub in Visual Studio 2019
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM