我有一个文件列表使用:
$git show commit:.data/path/to/file/
abc-2018-q1.csv
def-2019-q2.csv
the-2019-q1.csv
我想做$git show commit:.data/path/to/file/ | grep *q1*
即只选择名称中包含“q1”的文件。然而,该步骤不会给出任何结果。
如何获取包含“q1”的所需文件。
只选择名称中包含“q1”的文件。然而,该步骤不会给出任何结果。
grep找到模式,而q1
本身就是一个完美的模式。
git show commit:.data/path/to/file/ | grep q1
这个命令似乎错了,试试这个:
git show commit:.data/path/to/file | grep "q1"