简体   繁体   English

如何找到我拥有的提交版本?

[英]How do I find what commit version I have?

I know how to install a specific commit from git but how do I find what commit version I have? 我知道如何从git安装特定的提交,但是如何找到我拥有的提交版本? pip freeze | grep package pip freeze | grep package doesn't list the commit version and I didn't see anything in the docs for this. pip freeze | grep package没有列出提交版本,因此我在文档中没有看到任何内容。

It looks like this might not be possible: "pip's ability to discern where the install came from is limited after the fact using pip freeze." 看来这可能是不可能的:“在使用pip冻结后,pip识别安装来源的能力受到限制。” See this link: https://github.com/pypa/pip/issues/609 看到这个链接: https : //github.com/pypa/pip/issues/609

Discussion on SO: Pip freeze does not show repository paths for requirements file 关于SO的讨论: Pip冻结不显示需求文件的存储库路径

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

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