1

我想在 gitub 上监控我的 repo,所以我尝试使用gitstats来查看一些统计信息,比如更改了多少代码。我将 gitstats 添加到我的存储库中,但之后我不确定如何实际创建 html 文件。

当我在 Windows 应用程序甚至 cmd 上使用来自 github 的 shell 时,当我尝试运行 gitstats、./gitstats、$./gitstats 时,它们都不起作用。

gitstats 目前不需要安装;它直接从目录中使用(它还假设一些文件,如样式表在 .)

假设您在 /mnt/src/git/project 有一个 git 项目,并且您希望将统计信息保存到 ~/public_html/project

你会运行: $ ./gitstats /mnt/src/git/project ~/public_html/project (如果它是一个大项目,去喝杯咖啡:) $ sensible-browser ~/public_html/project/index.html

即使我尝试 gitstats 安装文件中的东西,它也不起作用。

知道我该如何解决这个问题吗?谢谢

4

1 回答 1

1

这是一个旧帖子,但无论如何可能会派上用场。

在 Windows 上使用 python gitstats 而不仅仅是 gitstats。您还可以使用带有反斜杠的常规 Windows 路径。指向 .git 文件夹所在的存储库根目录,而不是分支。

因此,您将调用以下命令(假设您在 GitStats 目录中并且 python 在您的 PATH 中):

如果你的 python 在 PATH 变量上并且你在 GitStats 目录中,请使用以下语法

python gitstats C:\path_to_local_repo\ C:\path_to_output_dir\

希望这可以帮助

于 2014-05-13T18:55:24.477 回答