What I would like to do is to checkout a single file or a set of files with a common name part like this
git checkout myBranch */myFile.md
and
git checkout myBranch -- */*Test*
(not sure about the '--' part)
instead of
git checkout myBranch src/main/java/a/deep/package/structure/myFile.md
and
git checkout myBranch src/test/java/a/deep/package/structure/TestOne.java
git checkout myBranch src/test/java/a/deep/package/structure/TestTwo.java
git checkout myBranch src/test/java/a/deep/package/structure/resources/TestData.sql
I know there is some limited wildcard functionality for some git command like diff
and add
but have found nothing for checkout
. Is there a way?
EDIT: I am using git 1.7.9.5 on Linux. A working combination of git and shell commmands would be acceptable as well.