git - 计算 git 存储库中的文件数量

标签 git git-remote

是否有可能在不克隆的情况下计算 git 远程存储库中的文件数量?在 CVS 中我们将使用

cvs rls -lR $OldSrc $ProjectName'"  | grep -v -e '^\$' -e '$ProjectName' -e '^d' | wc -l

哪里,

    OldSrc --> Tag name [optional]
    ProjectName --> Actual project repository name.

请告诉我git中方便的命令。

最佳答案

您无法远程执行此操作。您必须克隆 git 存储库或 ssh 到远程计算机才能查看存储库。

一旦您拥有存储库,您就可以列出文件,例如,

git show master^{tree}

您可以将 master 替换为您感兴趣的分支/提交的名称。此命令也适用于裸存储库。

关于git - 计算 git 存储库中的文件数量,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11981765/

相关文章:

git - 无法将分支推送到 github

GIT 1.9 - 远程 : error: 'receive.denyCurrentBranch'

git - 命令 `git remote add` 在哪里进行更改?

git - 在 Ubuntu 13.10 上降级 git

git - 在 buildbot 中 check out 多个 git 存储库时如何使用复制模式

git - 如何将远程 Git 存储库添加到 Ubuntu 服务器?

windows - 如何编辑我的 .git/config 文件?

linux - 如何针对 Kerberos 跳过 Git 的密码输入?

git - .gitignore 没有忽略我的 vim 临时文件