简体   繁体   English

是否可以检测站点是否正在使用版本控制系统

[英]Is it possible to detect if a site is using a version control system

Guessing this is most likely not possible, at least by any easy or legal means, but I'm curious if maybe there is some small thing left behind in the public domain by a version control system that would be possible to detect. 猜测这很可能是不可能的,至少通过任何简单或合法的方式,但我很好奇是否可能通过版本控制系统在公共领域留下一些可以检测到的小事。

Even if its not possible to detect every type of version control, maybe there's a way to see one. 即使它不可能检测到每种类型的版本控制,也许有一种方法可以看到它。 Or maybe just a way to see that version control in general is being used, but not specifically which brand. 或者也许只是一种方式来查看通常使用的版本控制,但不是具体使用哪个品牌。

For instance, if a site is using git, maybe there is a certain hash added to the end of a file that is available on the server and only git uses that structure. 例如,如果某个站点正在使用git,则可能在服务器上可用的文件末尾添加了某个哈希,并且只有git使用该结构。 Or maybe there is a way to detect that a file has been recently changed and mercurial performed a specific change to the line endings. 或者可能有一种方法可以检测到文件最近已被更改,并且mercurial对行结尾执行了特定更改。

Looking for outside of the box answers here 在这里寻找外面的答案

There is no reliable way to find that out, but sometimes there traces left in projects. 没有可靠的方法来找到它,但有时在项目中留下痕迹。 Most common thing is the configuration of the version control system Git creates a folder called .git, in subversion it's called .svn. 最常见的是版本控制系统的配置Git创建了一个名为.git的文件夹,在subversion中它被称为.svn。 You can try to access them on a website: 您可以尝试在网站上访问它们:

Try something like http://website.com/.git and http://website.com/.svn and so on. 尝试http://website.com/.githttp://website.com/.svn等等。 If that folder exists, they are most likely using this VCS. 如果该文件夹存在,则他们很可能使用此VCS。 Mind you, if it does not exist, this does not mean they are not using this VCS. 请注意,如果它不存在,这并不意味着他们没有使用此VCS。 Many servers will be configured to hide these folders from visitors. 许多服务器将配置为从访问者隐藏这些文件夹。

Good luck. 祝好运。

It will be faster to google or ask. 谷歌或要求它会更快。 Since you're talking about big companies just google, check quora, or check the skills listed on their job postings. 既然你在谈论大公司只是谷歌,检查quora,或检查他们的职位发布列出的技能。 For example: 例如:

The funny thing, though, is that what they are using is very rarely what they want to be using and would pick now, so it's not terribly useful data. 然而,有趣的是,他们正在使用的东西很少是他们想要使用的东西并且现在会选择,因此它不是非常有用的数据。 Google still officially uses Perforce, but everyone there wishes they were on a modern DVCS. 谷歌仍然正式使用Perforce,但是那里的每个人都希望他们使用的是现代DVCS。

Look at the source code for comments that the developers may have left in. You'd be surprised what teams will leave in there source code comments. 查看开发人员可能留下的评论的源代码。您会惊讶于团队将留下源代码注释。 While you will not be able to see the server language comments, perhaps the team left a ton of html comments on the site. 虽然您将无法看到服务器语言评论,但团队可能会在网站上留下大量的HTML评论。 Some might point the way to the answer you are looking for. 有些人可能指出了你正在寻找的答案。 Probably nothing like <!--Git is so cool. I love that we use it on this project--> 可能没有什么像<!--Git is so cool. I love that we use it on this project--> <!--Git is so cool. I love that we use it on this project--> but maybe something that talks about what they are using. <!--Git is so cool. I love that we use it on this project-->但也许是谈论他们正在使用的东西。 This is no guarantee, but if you read through all of the source you can see you just might find your answer. 这不是保证,但如果您仔细阅读所有来源,您可以看到您可能找到答案。

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

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