How to list versioned files in git?

后端 未结 2 1316
忘了有多久
忘了有多久 2021-02-02 08:13

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
<         


        
2条回答
  •  隐瞒了意图╮
    2021-02-02 08:42

    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
    

    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.

提交回复
热议问题