【发布时间】:2020-08-24 02:20:57
【问题描述】:
有没有办法列出我通过git add(参考1)而不是git annex add(参考2)添加的所有文件?
mkdir myrepo
cd myrepo
git init .
mkdir foo
dd if=/dev/random of=foo/bar.ext count=1024 bs=1024
git add foo # <----- ref 1
git commit -m "add foo"
git annex init "listing"
mkdir baz
dd if=/dev/random of=baz/abc.ext count=1024 bs=1024
dd if=/dev/random of=baz/efg.ext count=2024 bs=1024
dd if=/dev/random of=baz/xyz.ext count=512 bs=1024
git annex add baz # <---- ref 2
git commit -m "add baz"
所以当我运行git <some command> 时,它应该显示类似
foo/bar.ext
我使用的解决方案之一是 https://stackoverflow.com/a/61680771/7274758 。但是我想知道是否有更好的方法?
【问题讨论】: