Reputation: 78933
When I want to git add
a file, it's often in a subdirectory.
Imagine I have this set of changed files and I want to git add some_file.txt
:
foo/bar/some_file.txt
foo/bar/other_file.txt
foo/baz/third_file.txt
I've seen somewhere that there is a way to say:
git add foo/{any intermediate directory}/some_file.txt
I thought it involved foo/../some_file.txt
but it can't be that because that means "parent directory"
What was it?
Upvotes: 1
Views: 32
Reputation: 312106
You can use **
to specify "any directory":
$ git add foo/**/some_file.txt
Upvotes: 3