Add content of all directories that have a specified name

时间:2015-05-24 20:36:26

标签: git powershell posh-git

For instance, we want to add the contents of all Media directories that Git has been told to ignore. The directories are scattered throughout our project. Running git add -A -f isn't a solution, because it adds everything. An alternative is to add each individually, though that would take some time like this:

git add /Path/To/Media/*
git add /Other/Path/To/Media/*

1 个答案:

答案 0 :(得分:1)

This is what worked for us in PowerShell.

git add **/Media/* -f

hvd points out that this only works on my environment (though I haven't confirmed this myself,) which is PowerShell on Windows 8.1.