如何在git中列出版本化文件? [英] How to list versioned files in git?

查看:89
本文介绍了如何在git中列出版本化文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在git仓库的根目录中列出版本化文件。在bazaar中做同样的事情,你运行:

I would like to list the versioned files in the root directory of a git repository. To do the same thing in bazaar, you run:

bzr ls --versioned --non-recursive

我该如何在git中执行此操作?

How do I do this in git?

推荐答案

如果你准确地描述了你想要展示的商品,这会更有帮助。从bzr文档猜测,我想像你想要这样的东西。

It would be more helpful if you described exactly what listing you want to show. Guessing from the bzr document, I imagine that you want something like this.

git ls-tree --name-only HEAD

这列出当前目录中当前位于 HEAD中的文件名修订,它应该接近你所要求的。

This lists the names of files in the current directory which are currently in the HEAD revision, which should be close to what you are asking for.

这篇关于如何在git中列出版本化文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆