Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to `git add` a list of files from a file? [duplicate]

Tags:

git

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?

I have checked online and looked at git help add, but did not see anything that helps.

like image 313
merlin2011 Avatar asked Mar 21 '14 21:03

merlin2011


Video Answer


1 Answers

You can use xargs:

xargs -a file -d '\n' git add
like image 132
John Kugelman Avatar answered Nov 10 '22 14:11

John Kugelman