[英]How to get json list of files in git repository?
我想從git倉庫以JSON格式獲取文件列表。 你有任何想法如何做到這一點?
不確定您要尋找什么,但
$ git ls-files | jq -MRn '[inputs]'
將生成一個git ls-files
返回的JSON數組,例如
[
".gitignore",
".gitmodules",
".travis.yml",
"AUTHORS",
"COPYING",
"ChangeLog",
"Dockerfile"
]
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.