可以从文件中"git add"文件列表吗? [英] Is it possible to `git add` a list of files from a file?
本文介绍了可以从文件中"git add"文件列表吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
假设我在一个文件中有一个文件列表(以换行符分隔),并且我想git add
所有这些文件.
Suppose I have a list of files (newline delimited) in a file, and I want to git add
all these files.
有什么办法可以直接做到这一点?
Is there some way to do this directly?
我已经在线检查并查看了git help add
,但没有发现有任何帮助.
I have checked online and looked at git help add
, but did not see anything that helps.
推荐答案
您可以使用xargs:
You can use xargs:
xargs -a file -d '\n' git add
这篇关于可以从文件中"git add"文件列表吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文